本文整理汇总了PHP中HtmlHelper::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP HtmlHelper::__construct方法的具体用法?PHP HtmlHelper::__construct怎么用?PHP HtmlHelper::__construct使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HtmlHelper
的用法示例。
在下文中一共展示了HtmlHelper::__construct方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct(View $View, $settings = [])
{
if (isset($settings['prefix'])) {
$this->prefix = $settings['prefix'];
unset($settings['prefix']);
}
parent::__construct($View, $settings);
}
示例2: __construct
/**
* Constructor
*
* @param View $View The View this helper is being attached to.
* @param array $settings Configuration settings for the helper.
*/
public function __construct(View $View, $settings = array())
{
parent::__construct($View, $settings);
if (isset($this->_View->viewVars['dtColumns'])) {
foreach ($this->_View->viewVars['dtColumns'] as $config => $columns) {
$this->_parseSettings($config, $columns);
}
}
}
示例3: __construct
public function __construct(View $View, $settings = array())
{
parent::__construct($View, $settings);
if (!empty($settings['configFile'])) {
$this->loadConfig($settings['configFile']);
} else {
$this->loadConfig('TwitterBootstrap.html5_tags');
}
}
示例4:
function __construct()
{
if (!class_exists('PhpThumbFactory')) {
App::import('Vendor', 'phpthumb' . DS . 'ThumbLib.inc');
}
$this->path = PATH_ROOT . _JR_WWW_IMAGES;
$this->path_tn = PATH_ROOT . _JR_WWW_IMAGES . 'jreviews' . _DS . 'tn' . _DS;
$this->www = WWW_ROOT . _JR_WWW_IMAGES;
$this->www_tn = $this->www . 'jreviews' . _DS . 'tn' . _DS;
parent::__construct();
// Make parent class vars available here, like cmsVersion
}
示例5: __construct
/**
* Constructor
*
* @param View $View The View this helper is being attached to.
* @param array $settings Configuration settings for the helper.
*/
public function __construct(View $View, $settings = array())
{
parent::__construct($View, $settings);
$this->settings = Hash::merge($this->settings, $settings);
if (isset($this->_View->viewVars['dtColumns'])) {
$dtColumns = $this->_View->viewVars['dtColumns'];
foreach ($dtColumns as $model => $columns) {
$this->_paginatedModels[] = $model;
$this->_parseSettings($model, $columns);
}
}
}
示例6: __construct
/**
* Constructor
*/
public function __construct(View $View, $settings = array())
{
$themeConfig = CroogoTheme::config($View->theme);
$themeSettings = $themeConfig['settings'];
$settings = Hash::merge($themeSettings, $settings);
parent::__construct($View, $settings);
$themeCss = $themeSettings['css'];
$boxIconClass = trim($settings['iconDefaults']['classDefault'] . ' ' . $settings['iconDefaults']['classPrefix'] . 'list');
$this->_tags['beginbox'] = "<div class='{$themeCss['row']}'>\n\t\t\t\t<div class='{$themeCss['columnFull']}'>\n\t\t\t\t\t<div class='box'>\n\t\t\t\t\t\t<div class='box-title'>\n\t\t\t\t\t\t\t<i class='{$boxIconClass}'></i>\n\t\t\t\t\t\t\t%s\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class='box-content %s'>";
$this->_tags['endbox'] = '</div>
</div>
</div>
</div>';
$this->_tags['icon'] = '<i class="%s"%s></i>';
}
示例7: __construct
public function __construct(View $View, $settings = array())
{
parent::__construct($View, $settings);
$this->_tags['beginbox'] = '<div class="row-fluid">
<div class="span12">
<div class="box">
<div class="box-title">
<i class="icon-list"></i>
%s
</div>
<div class="box-content %s">';
$this->_tags['endbox'] = '</div>
</div>
</div>
</div>';
$this->_tags['icon'] = '<i class="%s"%s></i> ';
}
示例8: __construct
/**
* Constructor
*/
public function __construct(View $View, $settings = array())
{
if (isset($View->viewVars['themeSettings'])) {
$themeSettings = $View->viewVars['themeSettings'];
$settings = Hash::merge(array('iconDefaults' => $themeSettings['iconDefaults'], 'icons' => $themeSettings['icons']), $settings);
} else {
$croogoTheme = new CroogoTheme();
$themeData = $croogoTheme->getData();
$themeSettings = $themeData['settings'];
$settings = Hash::merge($themeSettings, $settings);
}
parent::__construct($View, $settings);
$themeCss = $themeSettings['css'];
$boxIconClass = trim($settings['iconDefaults']['classDefault'] . ' ' . $settings['iconDefaults']['classPrefix'] . 'list');
$this->_tags['beginbox'] = "<div class='{$themeCss['row']}'>\n\t\t\t\t<div class='{$themeCss['columnFull']}'>\n\t\t\t\t\t<div class='box'>\n\t\t\t\t\t\t<div class='box-title'>\n\t\t\t\t\t\t\t<i class='{$boxIconClass}'></i>\n\t\t\t\t\t\t\t%s\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class='box-content %s'>";
$this->_tags['endbox'] = '</div>
</div>
</div>
</div>';
$this->_tags['icon'] = '<i class="%s"%s></i>';
}
示例9: __construct
/**
* Sets up various vars/classes required
*
* @return null
* @access public
*/
public function __construct($settings = array())
{
$sessionKey = 'Auth';
if (is_array($settings) && isset($settings[0])) {
$sessionKey = $settings[0];
} elseif (is_string($settings)) {
$sessionKey = $settings;
}
$this->sessionKey = $sessionKey;
$this->userModel = Configure::read('Permissible.UserModelAlias');
$user = ClassRegistry::init(Configure::read('Permissible.UserModel'));
$this->userModelPrimary = $user->primaryKey;
$name = Inflector::camelize(strtolower(Configure::read('Acl.classname')));
if (!class_exists($name)) {
if (App::import('Component', $name)) {
list($plugin, $name) = pluginSplit($name);
$name .= 'Component';
} else {
trigger_error(sprintf(__('Could not find %s.'), $name), E_USER_WARNING);
}
}
$this->_Instance =& new $name();
parent::__construct($settings);
}
示例10: __construct
/**
* __construct
* @param View $View
* @param array $settings
*/
public function __construct(View $View, $settings = array())
{
parent::__construct($View, $settings);
$this->Image = new ImageHelper($View, $settings);
}
示例11: array
function __construct(View $View, $settings = array())
{
parent::__construct($View, $settings);
$this->setVariables();
}
示例12: __construct
public function __construct(View $View, $settings = array())
{
parent::__construct($View, $settings);
$bootstrapTags = array('botstrap_checkboxmultiple_inline_start' => '', 'botstrap_checkboxmultiple_inlines_end' => '', 'bootstrap_checkboxmultiple_inline' => '<label class="%s" for="%s"><input type="checkbox" name="%s[]" %s />%s</label>', 'bootstrap_checkboxmultiple_block' => '<div %s><label class="%s" for="%s"><input type="checkbox" name="%s[]" %s />%s</label></div>');
$this->_tags = array_merge($this->_tags, $bootstrapTags);
}
示例13: __construct
/**
* contruct
* - allow defaults to be overridden
* @param $settings array
*/
public function __construct(View $View, $settings = array())
{
parent::__construct($View, $settings);
}
示例14: __construct
public function __construct(\View $View, $settings = array())
{
parent::__construct($View, $settings);
$this->aclComponent = new AclComponent(new ComponentCollection());
}
示例15: __construct
/**
* construct method
*
* @param array $settings array()
* @return void
* @access private
*/
public function __construct($View, $settings = array())
{
$this->settings = array_merge($this->settings, $settings);
parent::__construct($View, $settings);
}