當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Widgetkit類代碼示例

本文整理匯總了PHP中Widgetkit的典型用法代碼示例。如果您正苦於以下問題:PHP Widgetkit類的具體用法?PHP Widgetkit怎麽用?PHP Widgetkit使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了Widgetkit類的11個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: __construct

 public function __construct()
 {
     parent::__construct();
     // load widgetkit
     require_once JPATH_ADMINISTRATOR . '/components/com_widgetkit/widgetkit.php';
     $this->widgetkit = Widgetkit::getInstance();
 }
開發者ID:ziyou-liu,項目名稱:1line,代碼行數:7,代碼來源:widgetkit.php

示例2: getInstance

 public static function getInstance()
 {
     // add instance, if not exists
     if (!isset(self::$_instance)) {
         self::$_instance = new Widgetkit();
     }
     return self::$_instance;
 }
開發者ID:ziyou-liu,項目名稱:1line,代碼行數:8,代碼來源:widgetkit.php

示例3: pathWK

 public function pathWK($resource)
 {
     // load widgetkit
     if (JFile::exists(JPATH_ADMINISTRATOR . '/components/com_widgetkit/widgetkit.php')) {
         require_once JPATH_ADMINISTRATOR . '/components/com_widgetkit/widgetkit.php';
     }
     $widgetkit = Widgetkit::getInstance();
     return $widgetkit['path']->path($resource);
 }
開發者ID:knigherrant,項目名稱:decopatio,代碼行數:9,代碼來源:path.php

示例4: onPrepareContent

 public function onPrepareContent(&$article, &$params, $limitstart)
 {
     preg_match_all('#\\[widgetkit id=(\\d+)\\]#', $article->text, $matches);
     if (count($matches[1])) {
         // load widgetkit
         require_once JPATH_ADMINISTRATOR . '/components/com_widgetkit/widgetkit.php';
         // get widgetkit
         $widgetkit = Widgetkit::getInstance();
         // render output
         foreach ($matches[1] as $i => $widget_id) {
             $output = $widgetkit['widget']->render($widget_id);
             $output = $output === false ? "Could not load widget with the id {$widget_id}." : $output;
             $article->text = str_replace($matches[0][$i], $output, $article->text);
         }
     }
     return '';
 }
開發者ID:janssit,項目名稱:www.coolensjuwelen.be,代碼行數:17,代碼來源:widgetkit_content.php

示例5: json_encode

		echo json_encode($data);
	}

	/*
		Function: docopy
			Copy action

		Returns:
			Void
	*/
	public function docopy(){

		if ($id = $this['request']->get('id', 'int')) {
			$this['widget']->copy($id);
		}

		echo $this['template']->render('dashboard');
	}

}

// bind events
$widgetkit = Widgetkit::getInstance();
$widgetkit['event']->bind('site', array($widgetkit['accordion'], 'site'));
$widgetkit['event']->bind('dashboard', array($widgetkit['accordion'], 'dashboard'));
$widgetkit['event']->bind('task:edit_accordion', array($widgetkit['accordion'], 'edit'));
$widgetkit['event']->bind('task:item_accordion', array($widgetkit['accordion'], 'item'));
$widgetkit['event']->bind('task:save_accordion', array($widgetkit['accordion'], 'save'));
$widgetkit['event']->bind('task:delete_accordion', array($widgetkit['accordion'], 'delete'));
$widgetkit['event']->bind('task:copy_accordion', array($widgetkit['accordion'], 'docopy'));
開發者ID:kosmosby,項目名稱:medicine-prof,代碼行數:30,代碼來源:accordion.php

示例6: __construct

 public function __construct()
 {
     // init vars
     $this->widgetkit = Widgetkit::getInstance();
     $this->type = strtolower(str_replace('Joomla', '', get_class($this)));
     $this->options = $this->widgetkit['system']->options;
     // bind events
     $this->widgetkit['event']->bind('dashboard', array($this, 'dashboard'));
     $this->widgetkit['event']->bind("render", array($this, 'render'));
     $this->widgetkit['event']->bind("task:edit_{$this->type}_joomla", array($this, 'edit'));
     $this->widgetkit['event']->bind("task:save_{$this->type}_joomla", array($this, 'save'));
     // register path
     $this->widgetkit['path']->register($this->widgetkit['path']->path('widgetkit_joomla.widgets:' . $this->type), "joomla{$this->type}");
 }
開發者ID:janssit,項目名稱:www.coolensjuwelen.be,代碼行數:14,代碼來源:widgetkit_joomla.php

示例7: fetchElement

 function fetchElement($name, $value, &$node, $control_name)
 {
     // get widgetkit
     $widgetkit = Widgetkit::getInstance();
     return $widgetkit['field']->render('widget', $control_name . '[' . $name . ']', $value, null);
 }
開發者ID:janssit,項目名稱:www.coolensjuwelen.be,代碼行數:6,代碼來源:widget.php

示例8: __construct

 public function __construct()
 {
     parent::__construct(false, 'Widgetkit - Twitter', array('description' => 'Lets you display your tweets'));
     // get widgetkit
     $this->widgetkit = Widgetkit::getInstance();
 }
開發者ID:nakamuraagatha,項目名稱:yooo,代碼行數:6,代碼來源:system.php

示例9: __construct

 public function __construct($id, $type, $style, $name, $content, $created, $modified)
 {
     $widgetkit = Widgetkit::getInstance();
     // init vars
     $this->id = $id;
     $this->type = $type;
     $this->name = $name;
     $this->content = $widgetkit['data']->create($content);
     $this->created = $created;
     $this->modified = $modified;
     if (is_null($style)) {
         $settings = $this->content->get("settings", array());
         $style = isset($settings["style"]) ? $settings["style"] : null;
     }
     if (is_null($style) || !$widgetkit["path"]->path("widgets:" . $this->type . "/styles/{$style}/config.xml")) {
         $style = $widgetkit["widget"]->defaultStyle($this->type);
     }
     $this->style = $style;
 }
開發者ID:navetisyan,項目名稱:asatryans,代碼行數:19,代碼來源:widget.php

示例10: getInput

 function getInput()
 {
     // get widgetkit
     $widgetkit = Widgetkit::getInstance();
     return $widgetkit['field']->render('widget', $this->name, $this->value, null);
 }
開發者ID:ziyou-liu,項目名稱:1line,代碼行數:6,代碼來源:widget.php

示例11: __construct

 public function __construct($id, $type, $style, $name, $content, $created, $modified)
 {
     $widgetkit = Widgetkit::getInstance();
     // init vars
     $this->id = $id;
     $this->type = $type;
     $this->name = $name;
     $this->content = $widgetkit["data"]->create($content);
     $this->created = $created;
     $this->modified = $modified;
 }
開發者ID:rubencamargogomez,項目名稱:custom_properties,代碼行數:11,代碼來源:widget.php


注:本文中的Widgetkit類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。