本文整理汇总了PHP中AppHelper::beforeRender方法的典型用法代码示例。如果您正苦于以下问题:PHP AppHelper::beforeRender方法的具体用法?PHP AppHelper::beforeRender怎么用?PHP AppHelper::beforeRender使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AppHelper
的用法示例。
在下文中一共展示了AppHelper::beforeRender方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: beforeRender
/**
* 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: beforeRender
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: beforeRender
function beforeRender()
{
App::import('Lib', 'Shop.ShopConfig');
$currencyFormats = ShopConfig::load('currencyFormats');
foreach ($currencyFormats as $formatName => $options) {
$this->addFormat($formatName, $options);
}
parent::beforeRender();
}
示例4: beforeRender
/**
* beforeRender callback
*
* @access public
*/
public function beforeRender()
{
if (!$this->enabled) {
return;
}
parent::beforeRender();
$this->Javascript->cacheEvents(false, true);
$this->Javascript->enabled = false;
}
示例5: beforeRender
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: beforeRender
function beforeRender()
{
if (is_object($this->view)) {
foreach ($this->settings as $from => $alias) {
$this->_replace($from, $alias);
}
}
parent::beforeRender();
}
示例7: beforeRender
/**
* 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: beforeRender
/**
* 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: beforeRender
/**
* 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: beforeRender
/**
* 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: beforeRender
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: beforeRender
/**
* 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: beforeRender
/**
* 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: beforeRender
/**
* 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: beforeRender
/**
* 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);
}