本文整理汇总了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;未经允许,请勿转载。 |
请发表评论