コード例 #1
0
ファイル: menu.php プロジェクト: hadzi/brekfarm
 /**
  * beforeRender callback
  *
  * @return void
  * @access public
  */
 public function beforeRender()
 {
     parent::beforeRender();
     $this->Jquery->uses('jquery', 'ui', 'potato.menu');
     $this->_categoryModel = $this->params['menu']['model'];
     $this->_categoryController = Inflector::underscore(Inflector::pluralize($this->_categoryModel));
 }
コード例 #2
0
ファイル: RatingsHelper.php プロジェクト: cepedag14/phkondo
 public function beforeRender($viewFile)
 {
     parent::beforeRender($viewFile);
     $this->models = $this->Session->read('Feedback.RatingModels');
     $options = array('inline' => false);
     $this->Html->script('Feedback.rateit-1.0.4/jquery.rateit.min', $options);
     $this->Html->css('Feedback./js/rateit-1.0.4/rateit', null, $options);
     $this->Html->css('Feedback./js/rateit-1.0.4/bigstars', null, $options);
 }
コード例 #3
0
ファイル: shop.php プロジェクト: kevthunder/cake-shop
 function beforeRender()
 {
     App::import('Lib', 'Shop.ShopConfig');
     $currencyFormats = ShopConfig::load('currencyFormats');
     foreach ($currencyFormats as $formatName => $options) {
         $this->addFormat($formatName, $options);
     }
     parent::beforeRender();
 }
コード例 #4
0
ファイル: jquery.php プロジェクト: hadzi/brekfarm
 /**
  * beforeRender callback
  *
  * @access public
  */
 public function beforeRender()
 {
     if (!$this->enabled) {
         return;
     }
     parent::beforeRender();
     $this->Javascript->cacheEvents(false, true);
     $this->Javascript->enabled = false;
 }
コード例 #5
0
 public function beforeRender()
 {
     parent::beforeRender();
     $this->log('beforeRender called');
     if (!isset($this->request->params['admin']) && !$this->request->isAjax()) {
         $this->Html->css('/ResponsiveMenu/css/menu', null, array('inline' => false));
         $this->Html->script('/ResponsiveMenu/js/menu', false, array('once' => true, 'inline' => false));
     }
 }
コード例 #6
0
ファイル: alias.php プロジェクト: hiromi2424/hack_plugin
 function beforeRender()
 {
     if (is_object($this->view)) {
         foreach ($this->settings as $from => $alias) {
             $this->_replace($from, $alias);
         }
     }
     parent::beforeRender();
 }
コード例 #7
0
ファイル: analogue.php プロジェクト: joebeeson/analogue
 /**
  * Executed prior to rendering
  * @return null
  * @access public
  */
 public function beforeRender()
 {
     foreach ($this->mappings as $mapping) {
         extract($mapping);
         if (isset($helper) and isset($rename)) {
             $this->mapHelper($helper, $rename);
         }
     }
     parent::beforeRender();
 }
コード例 #8
0
 /**
  * beforRender
  */
 public function beforeRender($layoutFile)
 {
     parent::beforeRender($layoutFile);
     $session = $this->Session->read('Plupload.Uploader');
     if (!empty($session)) {
         $this->settings = am($this->settings, $session);
     }
     if ($this->settings['asset_path'] !== '/plupload/pl/') {
         $this->settings['flash_swf_url'] = $this->settings['asset_path'] . 'plupload.flash.swf';
         $this->settings['silverlight_xap_url'] = $this->settings['asset_path'] . 'plupload.silverlight.xap';
     }
 }
コード例 #9
0
 /**
  * Before render Callback
  *
  * @return void
  */
 public function beforeRender($viewFile)
 {
     parent::beforeRender($viewFile);
     $this->enabled = !empty($this->_View->viewVars['commentParams']);
     if ($this->enabled) {
         foreach ($this->__passedParams as $param) {
             if (empty($this->_View->viewVars['commentParams'][$param])) {
                 $this->enabled = false;
                 break;
             }
         }
     }
 }
コード例 #10
0
ファイル: KtaiHelper.php プロジェクト: Quang2727/Kaopass
 /**
  * beforeRenderコールバック
  *
  * @return (なし)
  * @access public
  */
 function beforeRender($viewFile)
 {
     parent::beforeRender($viewFile);
     $this->options['input_encoding'] = Configure::read('App.encoding');
     $this->options['output_encoding'] = Configure::read('App.encoding');
     $this->_lib3gk = Lib3gk::get_instance();
     $this->_lib3gk->_url_callback = array($this, 'url_callback_func');
     $this->_lib3gk->_params = array_merge($this->_lib3gk->_params, $this->options);
     $params = Configure::read('Ktai');
     if (!empty($params)) {
         $this->_lib3gk->_params = array_merge($this->_lib3gk->_params, $params);
     }
     $this->options =& $this->_lib3gk->_params;
 }
コード例 #11
0
 public function beforeRender()
 {
     parent::beforeRender();
     if (!empty($this->params['controller']) && !empty($this->params['action'])) {
         $candidates = array($this->params['controller'], $this->params['controller'] . '/' . $this->params['action']);
         foreach ($candidates as $candidate) {
             if (is_readable(CSS . DS . str_replace('/', DS, $candidate) . '.css')) {
                 self::$__stylesheets[] = $candidate;
             }
         }
         foreach ($candidates as $candidate) {
             if (is_readable(JS . DS . str_replace('/', DS, $candidate) . '.js')) {
                 self::$__javascripts[] = $candidate . '.js';
             }
         }
     }
 }
コード例 #12
0
ファイル: resource.php プロジェクト: rchick/syrup
 /**
  * Before rendering a view check for automatic files
  */
 public function beforeRender()
 {
     parent::beforeRender();
     if (!empty($this->params['controller']) && !empty($this->params['action'])) {
         $candidates = array();
         $view = ClassRegistry::getObject('view');
         if (!empty($view)) {
             $candidates[] = $view->layout;
         }
         $candidates = array_merge($candidates, array($this->params['controller'], $this->params['controller'] . '/' . $this->params['action']));
         foreach ($candidates as $candidate) {
             if (is_readable(CSS . DS . str_replace('/', DS, $candidate) . '.css')) {
                 self::$__stylesheets[] = $candidate;
             }
         }
         foreach ($candidates as $candidate) {
             if (is_readable(JS . DS . str_replace('/', DS, $candidate) . '.js')) {
                 self::$__javascripts[] = $candidate . '.js';
             }
         }
     }
 }
コード例 #13
0
 /**
  * Before render callback. beforeRender is called before the view file is rendered.
  *
  * Overridden in subclasses.
  *
  * @param string $viewFile The view file that is going to be rendered
  * @return void
  */
 public function beforeRender($viewFile)
 {
     $this->NetCommonsHtml->css('/users/css/style.css');
     $this->NetCommonsHtml->script('/data_types/js/data_types.jquery.js');
     parent::beforeRender($viewFile);
 }
コード例 #14
0
 /**
  * Before Render
  *
  * @return	void
  * @access	public
  */
 public function beforeRender($viewFile)
 {
     parent::beforeRender($viewFile);
     $this->savedUrl = '/files/uploads/';
     $this->savePath = WWW_ROOT . 'files' . DS . 'uploads' . DS;
 }
コード例 #15
0
 /**
  * Before render callback. beforeRender is called before the view file is rendered.
  *
  * Overridden in subclasses.
  *
  * @param string $viewFile The view file that is going to be rendered
  * @return void
  */
 public function beforeRender($viewFile)
 {
     $this->NetCommonsHtml->css(array('/site_manager/css/style.css'));
     $this->NetCommonsHtml->script(array('/system_manager/js/system_manager.js'));
     parent::beforeRender($viewFile);
 }
コード例 #16
0
 /**
  * Before render callback. beforeRender is called before the view file is rendered.
  *
  * Overridden in subclasses.
  *
  * @param string $viewFile The view file that is going to be rendered
  * @return void
  */
 public function beforeRender($viewFile)
 {
     $this->NetCommonsHtml->css(array('/auth/css/style.css'));
     parent::beforeRender($viewFile);
 }
コード例 #17
0
ファイル: BlockTabsHelper.php プロジェクト: akagane99/Blocks
 /**
  * ブロックタブの設定
  *
  * ### サンプル1
  * ```
  *	public $helpers = array(
  *		'Blocks.BlockTabs' => array(
  *			'mainTabs' => array('block_index', 'frame_settings'),
  *			'blockTabs' => array('block_settings', 'mail_settings', 'role_permissions'),
  *		)
  *	);
  * ```
  *
  * ### サンプル2(urlを指定する場合)
  * ```
  *	public $helpers = array(
  *		'Blocks.BlockTabs' => array(
  *			'mainTabs' => array(
  *				'block_index' => array('url' => array('controller' => 'blog_blocks')),
  *				'frame_settings' => array('url' => array('controller' => 'blog_frame_settings')),
  *			),
  *			'blockTabs' => array(
  *				'block_settings' => array('url' => array('controller' => 'blog_blocks')),
  *				'mail_settings',
  *				'role_permissions' => array('url' => array('controller' => 'blog_block_role_permissions')),
  *			),
  *		),
  *	);
  * ```
  *
  * ### サンプル3(labelを指定する場合)
  * ```
  *	public $helpers = array(
  *		'Blocks.BlockTabs' => array(
  *			'mainTabs' => array(
  * 				// この例ではlabelは __d('blocks', 'Block list')に設定される
  *				'block_index' => array('label' => array('blocks', 'Block list')),
  *				'frame_settings',
  *			),
  *			'blockTabs' => array(
  *				'block_settings', 'mail_settings', 'role_permissions',
  *			),
  *		),
  *	);
  * ```
  *
  * @param string $viewFile The view file that is going to be rendered
  * @return void
  */
 public function beforeRender($viewFile)
 {
     parent::beforeRender($viewFile);
     //ブロックのメインタブ
     if (!isset($this->settings['mainTabs'])) {
         return;
     }
     $this->setMainTabs($this->settings['mainTabs']);
     //ブロック設定タブ
     if (!isset($this->settings['blockTabs'])) {
         return;
     }
     $this->setBlockTabs($this->settings['blockTabs']);
 }
コード例 #18
0
 /**
  * Before render callback
  * Initializes the Helper
  *
  * @param string $viewFile The view file that is going to be rendered
  * @return void
  */
 public function beforeRender($viewFile)
 {
     parent::beforeRender($viewFile);
     $this->_userFavorites = $this->_View->getVar('userFavorites');
 }
コード例 #19
0
 /**
  * Before render callback. beforeRender is called before the view file is rendered.
  *
  * Overridden in subclasses.
  *
  * @param string $viewFile The view file that is going to be rendered
  * @return void
  */
 public function beforeRender($viewFile)
 {
     $this->NetCommonsHtml->css('/categories/css/style.css');
     parent::beforeRender($viewFile);
 }
コード例 #20
0
ファイル: paginator.php プロジェクト: neggiel/senju
/**
 * Before render callback. Overridden to merge passed args with url options.
 *
 * @return void
 * @access public
 */
	function beforeRender() {
		$this->options['url'] = array_merge($this->params['pass'], $this->params['named']);

		parent::beforeRender();
	}
コード例 #21
0
ファイル: PaginatorHelper.php プロジェクト: racam/Project-X
 /**
  * Before render callback. Overridden to merge passed args with url options.
  *
  * @param string $viewFile
  * @return void
  */
 public function beforeRender($viewFile)
 {
     $this->options['url'] = array_merge($this->request->params['pass'], $this->request->params['named']);
     parent::beforeRender($viewFile);
 }
コード例 #22
0
ファイル: EditorHelper.php プロジェクト: hurad/hurad
 /**
  * Before render callback. beforeRender is called before the view file is rendered.
  *
  * @param string $viewFile The view file that is going to be rendered
  *
  * @return void
  */
 public function beforeRender($viewFile)
 {
     parent::beforeRender($viewFile);
     $this->Html->script('admin/ckeditor/ckeditor.js', ['block' => 'scriptHeader']);
     $this->Html->scriptBlock("window.onload = function() {CKEDITOR.replace('{$this->getName()}'," . $this->Js->object($this->editorConfig()) . ');};', ['block' => 'scriptHeader']);
 }
コード例 #23
0
 /**
  * Before render callback. Overridden to merge passed args with URL options.
  *
  * @param string $viewFile
  * @return void
  */
 public function beforeRender($viewFile)
 {
     $this->options['url'] = array_merge($this->request->params['pass'], $this->request->params['named']);
     if (!empty($this->request->query)) {
         $this->options['url']['?'] = $this->request->query;
     }
     parent::beforeRender($viewFile);
 }
コード例 #24
0
 /**
  * CSS Style Sheetを読み込む
  *
  * @param string $viewFile viewファイル
  * @return void
  * @link http://book.cakephp.org/2.0/ja/views/helpers.html#Helper::beforeRender Helper::beforeRender
  */
 public function beforeRender($viewFile)
 {
     $this->NetCommonsHtml->css('/user_attributes/css/style.css');
     parent::beforeRender($viewFile);
 }
コード例 #25
0
ファイル: TopicsHelper.php プロジェクト: s-nakajima/Topics
 /**
  * Before render callback. beforeRender is called before the view file is rendered.
  *
  * Overridden in subclasses.
  *
  * @param string $viewFile The view file that is going to be rendered
  * @return void
  */
 public function beforeRender($viewFile)
 {
     $this->NetCommonsHtml->css('/topics/css/style.css');
     $this->NetCommonsHtml->script('/topics/js/topics.js');
     parent::beforeRender($viewFile);
 }
コード例 #26
0
 /**
  * Before render callback. beforeRender is called before the view file is rendered.
  *
  * Overridden in subclasses.
  *
  * @param string $viewFile The view file that is going to be rendered
  * @return void
  */
 public function beforeRender($viewFile)
 {
     $this->NetCommonsHtml->script('/authorization_keys/js/authorization_keys.js');
     parent::beforeRender($viewFile);
 }