• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP RokCommon_Composite类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中RokCommon_Composite的典型用法代码示例。如果您正苦于以下问题:PHP RokCommon_Composite类的具体用法?PHP RokCommon_Composite怎么用?PHP RokCommon_Composite使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了RokCommon_Composite类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: __construct

 public function __construct(RokCommon_Registry $params)
 {
     parent::__construct($params);
     $this->context_base = self::BASE_PACKAGE_NAME;
     RokCommon_Composite::addPackagePath($this->context_base, JPATH_SITE . '/components/com_roksprocket', 10);
     RokCommon_Composite::addPackagePath($this->context_base, JPATH_SITE . '/modules/mod_roksprocket', 15);
     RokCommon_Composite::addPackagePath($this->context_base, $this->container['roksprocket.template.override.path'], 20);
 }
开发者ID:densem-2013,项目名称:exikom,代码行数:8,代码来源:ModRokSprocket.php


示例2: addStylePath

 public function addStylePath($path, $priority = self::DEFAULT_PRIORITY)
 {
     /** @var $platforminfo RokCommon_IPlatformInfo */
     $platforminfo = $this->container->getService('platforminfo');
     foreach ($platforminfo->getPathChecks() as $append) {
         RokCommon_Composite::addPackagePath(self::STYLE_CONTEXT, $path . $append, $priority);
     }
 }
开发者ID:TeamCodeStudio,项目名称:fpmoz,代码行数:8,代码来源:AbstractHeader.php


示例3: __construct

 public function __construct(RokCommon_Dispatcher $dispatcher)
 {
     JTable::addIncludePath(JPATH_ADMINISTRATOR . '/components/com_advancedmodules/tables');
     if (JPluginHelper::isEnabled('system', 'advancedmodules') && $this->isComponentEnabled()) {
         RokCommon_Composite::addPackagePath('roksprocket', dirname(__FILE__) . '/AdvancedModuleManager', 25);
         $dispatcher->connect('roksprocket.module.get', array($this, 'getModule'));
         $dispatcher->connect('roksprocket.module.save', array($this, 'saveModule'));
         $dispatcher->connect('roksprocket.module.duplicate', array($this, 'duplicateModule'));
     }
 }
开发者ID:networksoft,项目名称:networksoft.com.co,代码行数:10,代码来源:AdvancedModuleManager.php


示例4: _loadAssets

 public function _loadAssets()
 {
     if (!self::$css_loaded) {
         $type = strtolower($this->type);
         /** @var $header RokCommon_IHeader */
         $header = $this->container->getService('header');
         $header->addStyle(RokCommon_Composite::get($this->assets_content . '.' . $type . '.css')->getUrl($type . '.css'));
         self::$css_loaded = true;
     }
 }
开发者ID:densem-2013,项目名称:exikom,代码行数:10,代码来源:label.php


示例5: init

 function init()
 {
     if (!defined('ROKCOMMON_LIB_PATH')) {
         define('ROKCOMMON_LIB_PATH', JPATH_SITE . '/libraries/rokcommon');
     }
     if (is_file(ROKCOMMON_LIB_PATH . '/include.php')) {
         include ROKCOMMON_LIB_PATH . '/include.php';
     }
     if (defined('ROKCOMMON') && class_exists('RokCommon_Composite')) {
         RokCommon_Composite::addPackagePath('mod_rokgallery', JPATH_SITE . '/templates/rt_momentum/overrides/mod_rokgallery/templates', 20);
     }
 }
开发者ID:Simarpreet05,项目名称:joomla,代码行数:12,代码来源:compositeoverrides.php


示例6: renderLayoutHeaders

 /**
  * Called to render headers that should be included only once per Layout type used
  */
 public function renderLayoutHeaders()
 {
     if (!self::$instanceHeadersRendered) {
         $root_assets = RokCommon_Composite::get($this->basePackage . '.assets.js');
         RokCommon_Header::addScript($root_assets->getUrl('moofx.js'));
         $instance = array();
         $instance[] = "window.addEvent('domready', function(){";
         $instance[] = "\t\tRokSprocket.instances.sliders = new RokSprocket.Sliders();";
         $instance[] = "});";
         RokCommon_Header::addInlineScript(implode("\n", $instance) . "\n");
         self::$instanceHeadersRendered = true;
     }
 }
开发者ID:shamusdougan,项目名称:Sapient_Web,代码行数:16,代码来源:RokSprocket_Layout_Sliders.php


示例7: initialize

 /**
  * @param RokSprocket_ItemCollection $items
  * @param RokCommon_Registry         $parameters
  */
 public function initialize(RokSprocket_ItemCollection $items, RokCommon_Registry $parameters)
 {
     $this->setItems($items);
     $this->setParameters($parameters);
     $this->layoutPackage = sprintf('roksprocket_layout_%s', $this->name);
     // setup the theme packages and content and info
     $this->theme = $this->parameters->get($this->name . '_themes', 'default');
     $this->themePackage = sprintf('%s_%s', $this->layoutPackage, $this->theme);
     $paths = $this->container[sprintf('roksprocket.layouts.%s.paths', $this->name)];
     foreach ($paths as $order => $path) {
         RokCommon_Composite::addPackagePath($this->layoutPackage, $path, $order);
         RokCommon_Composite::addPackagePath($this->themePackage, $path . '/themes/' . $this->theme, $order);
     }
     $this->theme_context = RokCommon_Composite::get($this->themePackage);
     $this->cleanItemParams();
 }
开发者ID:atikahmed,项目名称:joomla-probid,代码行数:20,代码来源:AbstractLayout.php


示例8: get

 /**
  * Get the full list of jobs
  * <code>
  * {
  *  'orberby': 'xxxx-x-x-x-x-x-x'
  * }
  * </code>
  * @param $params
  * @return RokCommon_Ajax_Result
  */
 public function get($params)
 {
     $result = new RokCommon_Ajax_Result();
     try {
         $q = Doctrine_Query::create()->select('j.*')->from('RokGallery_Model_Job j')->orderBy('j.created_at DESC');
         $jobs = $q->execute(array(), Doctrine_Core::HYDRATE_RECORD);
         $outjobs = array();
         foreach ($jobs as $job) {
             unset($job->properties);
             unset($job->sm);
             $outjobs[] = $job->toJsonableArray();
         }
         $html = RokCommon_Composite::get('com_rokgallery.jobs')->load('default.php', array('jobs' => $jobs));
         $result->setPayload(array('jobs' => $outjobs, 'html' => $html));
     } catch (Exception $e) {
         throw $e;
     }
     return $result;
 }
开发者ID:atikahmed,项目名称:joomla-probid,代码行数:29,代码来源:Jobs.php


示例9: get

 /**
  * Get the basic file info and supporting slices/tags
  * $params object should be a json like
  * <code>
  * {
  * }
  * </code>
  *
  * @param $params
  * @return RokCommon_Ajax_Result
  */
 public function get($params)
 {
     $result = new RokCommon_Ajax_Result();
     try {
         $q = Doctrine_Query::create()->select('j.*')->from('RokGallery_Model_Gallery j')->orderBy('j.name DESC');
         /** @var Doctrine_Collection $galleries  */
         $galleries = $q->execute(array(), Doctrine_Core::HYDRATE_RECORD);
         $outgalleries = array();
         foreach ($galleries as $gallery) {
             /** @var RokGallery_Model_Gallery $gallery  */
             $outgalleries[] = $gallery->toJsonableArray();
         }
         $html = RokCommon_Composite::get('com_rokgallery.galleries')->load('default.php', array('galleries' => $galleries));
         $result->setPayload(array('galleries' => $outgalleries, 'html' => $html, 'delete_slices' => RokGallery_Config::getOption(RokGallery_Config::OPTION_GALLERY_REMOVE_SLICES, 0)));
     } catch (Exception $e) {
         throw $e;
     }
     return $result;
 }
开发者ID:atikahmed,项目名称:joomla-probid,代码行数:30,代码来源:Galleries.php


示例10: get

 /**
  * Get the basic gallery info and supporting slices/tags
  * $params object should be a json like
  * <code>
  * {
  *  'id': 1
  * }
  * </code>
  *
  * @param $params
  * @return RokCommon_Ajax_Result
  */
 public function get($params)
 {
     $result = new RokCommon_Ajax_Result();
     try {
         $gallery = RokGallery_Model_GalleryTable::getSingle($params->id);
         foreach ($gallery->Slices as &$slice) {
             $slice->populateFilterInfo();
             $slice->manipulations = RokGallery_Manipulation_Helper::prepSerializedForJson($slice->manipulations);
             $slice->clearRelated('File');
             $slice->Tags;
             $slice->FileTags;
         }
         $sortable_slices = $gallery->Slices->getData();
         usort($sortable_slices, array('RokGalleryAdminAjaxModelGallery', 'slice_ordering_sort'));
         $html = RokCommon_Composite::get('com_rokgallery.galleryorder')->load('default.php', array('slices' => $sortable_slices));
         $result->setPayload(array('gallery' => $gallery->toJsonableArray(), 'html' => $html));
     } catch (Exception $e) {
         throw $e;
     }
     return $result;
 }
开发者ID:atikahmed,项目名称:joomla-probid,代码行数:33,代码来源:Gallery.php


示例11: getXml

 /**
  * @return RokCommon_XMLElement
  * @throws RokCommon_Config_Exception
  */
 public function getXml()
 {
     $context = RokCommon_Composite::get(self::CONTEXT_PREFIX . $this->identifier);
     if ($context) {
         if ($this->searchMode == self::SEARCH_MODE_BASEDIRS) {
             $ret = $context->getAll($this->filename);
         } elseif ($this->searchMode == self::SEARCH_MODE_CHILDIRS) {
             $ret = $context->getAllSubFiles($this->filename);
         } else {
             throw new RokCommon_Config_Exception(rc__('Unknown mode of %s on config', $this->searchMode));
         }
         ksort($ret, SORT_NUMERIC);
         foreach ($ret as $priority => $files) {
             foreach ($files as $file) {
                 $file_xml = RokCommon_Utils_XMLHelper::getXML($file, true);
                 RokCommon_Options::mergeNodes($this->xml, $file_xml);
             }
         }
     }
     return $this->xml;
 }
开发者ID:TeamCodeStudio,项目名称:fpmoz,代码行数:25,代码来源:Section.php


示例12: getOptions

 /**
  * Method to get the field options for the list of installed editors.
  *
  * @return  array  The field option objects.
  * @since   11.1
  */
 protected function getOptions()
 {
     $container = RokCommon_Service::getContainer();
     $fieldname = $this->element['name'];
     $configkey = (string) $this->element['configkey'];
     $options = array();
     $params = $container[$configkey];
     $params = get_object_vars($params);
     ksort($params);
     foreach ($params as $id => $info) {
         if (!in_array($id, self::$loaded_icons)) {
             $layout_composite_path = 'roksprocket_layout_' . $id;
             $priority = 0;
             foreach ($info->paths as $path) {
                 RokCommon_Composite::addPackagePath($layout_composite_path, $path, $priority);
                 $priority++;
             }
             $iconurl = RokCommon_Composite::get($layout_composite_path)->getUrl($info->icon);
             if (empty($iconurl)) {
                 $iconurl = "components/com_roksprocket/assets/images/default_layout_icon.png";
             }
             $css = sprintf('#module-form i.layout.%s {background-image: url(%s);background-position: 0 0;}', $id, $iconurl);
             RokCommon_Header::addInlineStyle($css);
             self::$loaded_icons[] = $id;
         }
         if ($this->value == $id) {
             $selected = ' selected="selected"';
         } else {
             $selected = "";
         }
         $tmp = JHtml::_('select.option', $id, $info->displayname);
         // Set some option attributes.
         $tmp->attr = array('class' => $id, 'rel' => $fieldname . '_' . $id);
         $tmp->icon = $fieldname . ' ' . $id;
         $options[] = $tmp;
     }
     reset($options);
     return $options;
 }
开发者ID:networksoft,项目名称:networksoft.com.co,代码行数:45,代码来源:layoutselection.php


示例13: renderGlobalHeaders

 public function renderGlobalHeaders()
 {
     if (!self::$globalHeadersRendered) {
         RokCommon_Header::addScript(RokCommon_Composite::get($this->context_base . '.assets.js')->getUrl('mootools-mobile.js'));
         RokCommon_Header::addScript(RokCommon_Composite::get($this->context_base . '.assets.js')->getUrl('rokmediaqueries.js'));
         RokCommon_Header::addScript(RokCommon_Composite::get($this->context_base . '.assets.js')->getUrl('roksprocket.js'));
         $app = JFactory::getApplication();
         $menus = $app->getMenu('site');
         $active = $menus->getActive();
         if ($active === null) {
             $active = $menus->getDefault();
         }
         $ns = array();
         $ns[] = "if (typeof RokSprocket == 'undefined') RokSprocket = {};";
         $ns[] = "Object.merge(RokSprocket, {";
         $ns[] = "\tSiteURL: '" . str_replace('&', '&amp;', JRoute::_(JURI::root(true), true)) . "',";
         $ns[] = "\tCurrentURL: '" . str_replace('&', '&amp;', JRoute::_(JURI::current(true), true)) . "',";
         $ns[] = "\tAjaxURL: '" . str_replace('&', '&amp;', JRoute::_(JURI::root(true) . '/index.php?option=com_roksprocket&task=ajax&format=raw&ItemId=' . $active->id)) . "'";
         $ns[] = "});";
         RokCommon_Header::addInlineScript(implode("\n", $ns) . "\n");
         self::$globalHeadersRendered = true;
     }
 }
开发者ID:atikahmed,项目名称:joomla-probid,代码行数:23,代码来源:ModRokSprocket.php


示例14: renderLayoutHeaders

 /**
  * Called to render headers that should be included only once per Layout type used
  */
 public function renderLayoutHeaders()
 {
     $rendered = self::$instanceHeadersRenderedTheme;
     if (!isset($rendered[$this->theme]) || !$rendered[$this->theme]) {
         $instance = array();
         $instance[] = "window.addEvent('domready', function(){";
         $instance[] = "\t\tRokSprocket.instances." . $this->theme . " = new RokSprocket." . ucfirst($this->theme) . "();";
         $instance[] = "});";
         RokCommon_Header::addInlineScript(implode("\n", $instance) . "\n");
         self::$instanceHeadersRenderedTheme[$this->theme] = true;
     }
     if (!self::$instanceHeadersRendered) {
         $root_assets = RokCommon_Composite::get($this->basePackage . '.assets.js');
         $layout_assets = RokCommon_Composite::get($this->layoutPackage . '.assets.js');
         RokCommon_Header::addScript($root_assets->getUrl('moofx.js'));
         RokCommon_Header::addScript($layout_assets->getUrl('features.js'));
         self::$instanceHeadersRendered = true;
     }
 }
开发者ID:atikahmed,项目名称:joomla-probid,代码行数:22,代码来源:RokSprocket_Layout_Features.php


示例15: addFormPath

 /**
  * Proxy for RokCommon_Form_Helper::addFormPath().
  *
  * @param string|string[] $path     A path or array of paths to add.
  * @param int             $priority the priority for the path
  */
 public static function addFormPath($path, $priority = 10)
 {
     if (is_array($path)) {
         foreach ($path as $p) {
             self::addFormPath($p, $priority);
         }
         return;
     }
     RokCommon_Composite::addPackagePath(self::FORM_PATH_PACKAGE, $path, $priority);
 }
开发者ID:networksoft,项目名称:networksoft.com.co,代码行数:16,代码来源:Form.php


示例16: define

<?php

/**
 * @version   $Id: include.php 39370 2011-07-02 22:16:28Z btowles $
 * @author    RocketTheme http://www.rockettheme.com
 * @copyright Copyright (C) 2007 - 2011 RocketTheme, LLC
 * @license   http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
 */
if (!defined('JOOMLA_ROKGALLERYMODULE_LIB')) {
    define('JOOMLA_ROKGALLERYMODULE_LIB', 'JOOMLA_ROKGALLERYMODULE_LIB');
    $include_file = @realpath(realpath(ROKGALLERYMODULE_ROOT . '/lib/include.php'));
    $included_files = get_included_files();
    if (!in_array($include_file, $included_files) && ($loaderrors = (require_once $include_file)) !== 'ROKGALLERYMODULE_LIB_INCLUDED') {
        return $loaderrors;
    }
    RokGallery_Doctrine::addModelPath(JPATH_SITE . '/components/com_rokgallery/lib');
    RokCommon_Composite::addPackagePath('mod_rokgallery', JPATH_SITE . '/modules/mod_rokgallery/templates');
}
return 'JOOMLA_ROKGALLERYMODULE_LIB_LOADED';
开发者ID:atikahmed,项目名称:joomla-probid,代码行数:19,代码来源:include.php


示例17: sprintf

$iconURL = RokCommon_Composite::get($composite)->getUrl($container->icon);
if (empty($iconURL)) {
    $iconURL = "components/com_roksprocket/assets/images/default_layout_icon.png";
}
$css[] = sprintf('#module-form i.layout.%s {background-image: url(%s);background-position: 0 0;}', $that->layout, $iconURL);
?>

<style><?php 
echo implode("\n", $css);
?>
</style>

<div class="panel-left">
	<div class="panel-left-wrapper">
    	<?php 
echo RokCommon_Composite::get('roksprocket.module.edit')->load('edit_articles.php', array('that' => $that));
?>
	</div>
</div>
<div class="panel-right">
	<ul>
	    <?php 
foreach ($fieldSet as $field) {
    foreach (array('group_open', 'group_bit', 'group_close', 'group_class') as $group) {
        ${$group} = $that->form->getFieldAttribute($field->fieldname, $group, false, 'params');
    }
    ?>
	    <?php 
    if (!$field->hidden) {
        ?>
	        <?php 
开发者ID:densem-2013,项目名称:exikom,代码行数:31,代码来源:edit_roksprocket.php


示例18: array

<?php 
if ($that->show_page_heading) {
    ?>
<h1><?php 
    echo $that->page_heading;
    ?>
</h1>
<?php 
}
?>

<div class="rg-grid-view-container<?php 
echo $that->pageclass_sfx;
?>
">
    <?php 
echo RokCommon_Composite::get($that->context)->load('header.php', array('that' => $that));
?>
    <div class="rg-grid-view rg-col3">
        <?php 
foreach ($that->images as $that->image) {
    $that->slice = $that->slices[$that->image->id];
    echo RokCommon_Composite::get($that->context)->load('default_row.php', array('that' => $that));
    $that->item_number++;
}
?>
    </div>
</div>
<?php 
echo RokCommon_Composite::get($that->context)->load('pagination.php', array('that' => $that));
开发者ID:atikahmed,项目名称:joomla-probid,代码行数:30,代码来源:default.php


示例19: addPath

 public function addPath($path, $prefix, $priority = self::DEFAULT_PATH_PRIORITY)
 {
     parent::addPath($path, $prefix, $priority);
     RokCommon_Composite::addPackagePath($this->package, $path . DS . $this->container->getParameter('form.assets.appendpath', 'assets'), $priority);
 }
开发者ID:networksoft,项目名称:networksoft.com.co,代码行数:5,代码来源:ItemLoader.php


示例20: display

 /**
  * Display the view
  */
 public function display($tpl = null)
 {
     JHtml::_('behavior.framework', true);
     JHtml::_('behavior.keepalive');
     $this->container = RokCommon_Service::getContainer();
     $this->form = $this->get('Form');
     $this->item = $this->get('Item');
     $this->state = $this->get('State');
     $this->articles = $this->getModel()->getArticles($this->item->id, $this->item->params);
     $this->layout = isset($this->item->params['layout']) ? $this->item->params['layout'] : $this->form->getFieldAttribute('layout', 'default', 'text', 'params');
     $this->provider = isset($this->item->params['provider']) ? $this->item->params['provider'] : $this->form->getFieldAttribute('provider', 'default', 'text', 'params');
     if (!isset($this->container[sprintf('roksprocket.layouts.%s', $this->layout)])) {
         JError::raiseWarning(500, rc__(ROKSPROCKET_UNABLE_TO_FIND_LAYOUT_ERROR, $this->layout));
         $app = JFactory::getApplication();
         $app->redirect(JRoute::_(sprintf('index.php?option=%s&view=modules', RokSprocket_Helper::getRedirectionOption()), false));
         return false;
     }
     $this->perItemForm = $this->getModel()->getPerItemsForm($this->layout);
     /** @var $i18n RokCommon_I18N */
     /** @var $i18n RokCommon_I18N */
     $i18n = $this->container->i18n;
     foreach ($this->container['roksprocket.layouts'] as $layout_type => $layoutinfo) {
         $layout_lang_paths = $this->container[sprintf('roksprocket.layouts.%s.paths', $layout_type)];
         foreach ($layout_lang_paths as $lang_path) {
             @$i18n->loadLanguageFiles('roksprocket_layout_' . $layout_type, $lang_path);
         }
     }
     $load_more_total = count($this->articles);
     $module_params = new RokCommon_Registry($this->item->params);
     $limit = 10;
     if ($load_more_total > $limit) {
         $this->articles = $this->articles->trim($limit);
         $load_more = 'true';
     } else {
         $load_more = 'false';
     }
     $load_more_script = sprintf('RokSprocket.Paging = {more: %s, page: 1, next_page: 2, amount: %d};', $load_more, $load_more_total);
     // Check for errors.
     if (count($errors = $this->get('Errors'))) {
         JError::raiseError(500, implode("\n", $errors));
         return false;
     }
     // Read cookie for showing/hide per-article items
     if (!isset($_COOKIE['roksprocket-showitems'])) {
         $showitems_cookie = 1;
         setcookie("roksprocket-showitems", $showitems_cookie, time() + 60 * 60 * 24 * 365, '/');
     } else {
         $showitems_cookie = $_COOKIE['roksprocket-showitems'];
     }
     $this->showitems = (bool) $showitems_cookie;
     $siteURL = JURI::root(true);
     $adminURL = JURI::base(true);
     $this->addToolbar();
     $this->compileLess();
     $this->compileJS();
     RokCommon_Header::addInlineScript("RokSprocket.params = 'jform_params';RokSprocket.SiteURL = '" . $siteURL . "'; RokSprocket.AdminURL = '" . $adminURL . "'; RokSprocket.URL = RokSprocket.AdminURL + '/index.php?option=" . JFactory::getApplication()->input->getString('option') . "&task=ajax&format=raw';" . $load_more_script);
     RokCommon_Header::addStyle($siteURL . '/components/com_roksprocket/fields/filters/css/datepicker.css');
     $template_path_param = sprintf('roksprocket.providers.registered.%s.templatepath', strtolower($this->provider));
     if ($this->container->hasParameter($template_path_param)) {
         RokCommon_Composite::addPackagePath('roksprocket', $this->container->getParameter($template_path_param), 30);
     }
     parent::display($tpl);
 }
开发者ID:TeamCodeStudio,项目名称:fpmoz,代码行数:66,代码来源:view.html.php



注:本文中的RokCommon_Composite类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP RokCommon_Service类代码示例发布时间:2022-05-23
下一篇:
PHP Robots类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap