本文整理汇总了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));
}