当前位置: 首页>>代码示例>>PHP>>正文


PHP RokCommon_Composite::get方法代码示例

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


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

示例1: _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

示例2: 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

示例3: 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

示例4: 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

示例5: 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

示例6: 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

示例7: 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

示例8: 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

示例9: 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

示例10: defined

<?php

/**
 * @version   $Id: default.php 39617 2011-07-06 23:37:00Z 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
 */
defined('_JEXEC') or die('Restricted access');
echo RokCommon_Composite::get($passed_params->layout_context)->load('default.php', array('passed_params' => $passed_params));
开发者ID:atikahmed,项目名称:joomla-probid,代码行数:10,代码来源:default.php

示例11:

<?php

/**
 * @version   $Id$
 * @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 (RokCommon_Browser::getShortName() == 'ie7') {
    RokCommon_Header::addStyle(RokCommon_Composite::get($that->context)->getUrl('rokgallery-ie7.css'));
}
RokCommon_Header::addScript(RokCommon_Composite::get($that->context)->getUrl('loves' . RokGallery_Helper::getJSVersion() . '.js'));
开发者ID:atikahmed,项目名称:joomla-probid,代码行数:12,代码来源:includes.php

示例12: renderGlobalHeaders

 /**
  * @param null $ajax_path
  */
 public function renderGlobalHeaders($ajax_path = null)
 {
     if (!self::$globalHeadersRendered) {
         if (defined('_JEXEC')) {
             JHtml::_('behavior.framework');
         }
         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'));
         /** @var $platforminfo RokCommon_IPlatformInfo */
         $platforminfo = $this->container->getService('platforminfo');
         $ns = array();
         $ns[] = "if (typeof RokSprocket == 'undefined') RokSprocket = {};";
         $ns[] = "Object.merge(RokSprocket, {";
         $ns[] = "\tSiteURL: '" . str_replace('&', '&amp;', $platforminfo->getSEOUrl($platforminfo->getRootUrl(), true)) . "',";
         $ns[] = "\tCurrentURL: '" . str_replace('&', '&amp;', $platforminfo->getSEOUrl($platforminfo->getRootUrl(), true)) . "',";
         $ns[] = "\tAjaxURL: '" . str_replace('&', '&amp;', $platforminfo->getSEOUrl($platforminfo->getRootUrl() . $ajax_path)) . "'";
         $ns[] = "});";
         RokCommon_Header::addInlineScript(implode("\n", $ns) . "\n");
         self::$globalHeadersRendered = true;
     }
 }
开发者ID:densem-2013,项目名称:exikom,代码行数:25,代码来源:RokSprocket.php

示例13: getPreview

 /**
  * Returns the preview of an article
  * $params object should be a json like
  * <code>
  * {
  *  "id":"joomla-71"
  * }
  * </code>
  *
  * @param $params
  *
  * @throws Exception
  * @return \RokCommon_Ajax_Result
  */
 public function getPreview($params)
 {
     $result = new RokCommon_Ajax_Result();
     try {
         $html = '';
         list($provider_type, $id) = explode('-', $params->id);
         $container = RokCommon_Service::getContainer();
         //$provider_type = $params->provider;
         /** @var $provider RokSprocket_IProvider */
         $provider_service = $container['roksprocket.providers.registered.' . $provider_type . '.service'];
         $provider = $container->{$provider_service};
         if (isset($params->extras)) {
             $extras = new RokCommon_Registry($params->extras);
             $provider->setParams($extras);
         }
         $article = $provider->getArticlePreview($id);
         ob_start();
         echo RokCommon_Composite::get('roksprocket.module.edit')->load('edit_article_preview.php', array('article' => $article));
         $html .= ob_get_clean();
         $result->setPayload(array('html' => $html));
     } catch (Exception $e) {
         throw $e;
     }
     return $result;
 }
开发者ID:densem-2013,项目名称:exikom,代码行数:39,代码来源:Articles.php

示例14: 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

示例15: foreach

if (!$that->gallery_id) {
    foreach ($that->galleries as $that->gallery) {
        echo RokCommon_Composite::get('com_rokgallery.gallerypicker')->load('default_gallery.php', array('that' => $that));
    }
} else {
    foreach ($that->galleries->Slices as $that->slice) {
        echo RokCommon_Composite::get('com_rokgallery.gallerypicker')->load('default_slices_view.php', array('that' => $that));
    }
}
?>
			</ul>
			<div class="clr"></div>
		</div>

		<?php 
if ($that->show_menuitems) {
    ?>
		<div class="panel menuitems">
			<?php 
    echo RokCommon_Composite::get('com_rokgallery.gallerypicker')->load('default_menuitems.php', array('that' => $that));
    ?>
			<div class="clr"></div>
		</div>
		<?php 
}
?>
	</div>
</div>

<div class="clr"></div>
开发者ID:atikahmed,项目名称:joomla-probid,代码行数:30,代码来源:default.php


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