本文整理匯總了PHP中AppHelper::beforeLayout方法的典型用法代碼示例。如果您正苦於以下問題:PHP AppHelper::beforeLayout方法的具體用法?PHP AppHelper::beforeLayout怎麽用?PHP AppHelper::beforeLayout使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類AppHelper
的用法示例。
在下文中一共展示了AppHelper::beforeLayout方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: beforeLayout
public function beforeLayout($viewFile)
{
parent::beforeLayout($viewFile);
$js = array('/highcharts/js/highcharts', '/highcharts/js/highcharts-more');
$theme = $this->_getTheme($this->chart_name);
$exportingEnabled = $this->_checkExporting($this->chart_name);
$options3dEnabled = $this->_checkOptions3d($this->chart_name);
$drillDownEnabled = $this->_checkDrillDown($this->chart_name);
if ($exportingEnabled) {
$js[] = '/highcharts/js/modules/exporting';
}
if ($options3dEnabled) {
$js[] = '/highcharts/js/highcharts-3d.js';
}
if ($drillDownEnabled) {
array_push($js, '/highcharts/js/modules/drilldown');
}
switch ($theme) {
case 'gray':
case 'grid':
case 'dark-blue':
case 'dark-green':
case 'skies':
$js[] = '/highcharts/js/themes/' . $theme;
break;
default:
// $js[] = '/highcharts/js/themes/highroller';
break;
}
$this->Html->css('highcharts/css/highroller');
$this->Html->script($js, false);
return true;
}
示例2: beforeLayout
public function beforeLayout($viewFile)
{
parent::beforeLayout($viewFile);
$js = array('/high_charts/js/highcharts');
$theme = $this->_getTheme($this->chart_name);
$exportingEnabled = $this->_checkExporting($this->chart_name);
if ($exportingEnabled) {
$js[] = '/high_charts/js/modules/exporting';
}
switch ($theme) {
case 'gray':
case 'grid':
case 'dark-blue':
case 'dark-green':
case 'skies':
$js[] = '/high_charts/js/themes/' . $theme;
break;
default:
// $js[] = '/high_charts/js/themes/highroller';
break;
}
$this->Html->css('high_charts/css/highroller');
$this->Html->script($js, FALSE);
return true;
}
示例3: beforeLayout
/**
* Add styles and scripts to the page
*
* @param String $viewFile
*/
public function beforeLayout($viewFile)
{
parent::beforeLayout($viewFile);
echo $this->Html->script("shadowbox", array('inline' => false));
echo $this->Html->css("shadowbox", array('inline' => false));
echo $this->Html->scriptBlock('
$(function() {
Shadowbox.init({
handleOversize: "drag",
modal: true
});});', array('inline' => false));
}
示例4: beforeLayout
public function beforeLayout($viewFile)
{
parent::beforeLayout($viewFile);
$js = array('/plugins/high-charts/js/highcharts', '/plugins/high-charts/js/modules/exporting');
$theme = $this->_getTheme($this->chart_name);
switch ($theme) {
case 'gray':
case 'grid':
case 'dark-blue':
case 'dark-green':
case 'skies':
$js[] = '/plugins/high-charts/js/themes/' . $theme;
break;
default:
// $js[] = '/high_charts/js/themes/highroller';
break;
}
$this->Html->css('/plugins/high-charts/css/highroller');
$this->Html->script($js, array('block' => 'customScript'));
return true;
}
示例5: beforeLayout
public function beforeLayout($layoutFile)
{
parent::beforeLayout($layoutFile);
$this->Html->script('Sifter.sifter', array('inline' => false));
}