本文整理汇总了PHP中Textarea::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP Textarea::__construct方法的具体用法?PHP Textarea::__construct怎么用?PHP Textarea::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Textarea
的用法示例。
在下文中一共展示了Textarea::__construct方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct($name, $label, $options = null)
{
Asset::wysiwyg();
parent::__construct($name, $label, $options);
$this->setView('administr/form::textarea');
$this->options['class'] = array_get($this->getOptions(), 'class') . ' administr-wysiwyg';
}
示例2: __construct
/**
* Constructor.
*
* @param string $name
* @param string $pluginKey
* @param array $buttons
*/
public function __construct($name, $pluginKey = 'blog', array $buttons = array())
{
parent::__construct($name);
$this->pluginKey = $pluginKey;
$this->textFormatService = BOL_TextFormatService::getInstance();
// init list of buttons
if (!empty($buttons)) {
$this->buttons = $buttons;
}
// remove image and video buttons
if (!$this->textFormatService->isRichMediaAllowed()) {
$imageIndex = array_search(BOL_TextFormatService::WS_BTN_IMAGE, $this->buttons);
if ($imageIndex !== false) {
unset($this->buttons[$imageIndex]);
}
$videoIndex = array_search(BOL_TextFormatService::WS_BTN_VIDEO, $this->buttons);
if ($videoIndex !== false) {
unset($this->buttons[$videoIndex]);
}
}
$stringValidator = new StringValidator(0, 50000);
$stringValidator->setErrorMessage(OW::getLanguage()->text('base', 'text_is_too_long', array('max_symbols_count' => 50000)));
$this->addValidator($stringValidator);
}
示例3: __construct
public function __construct()
{
parent::__construct();
$this->set('list', false);
$this->data('module', 'format-code');
}
示例4: __construct
public function __construct($name)
{
parent::__construct($name);
OW::getDocument()->addStyleSheet(OW::getPluginManager()->getPlugin('photo')->getStaticCssUrl() . 'edit_photo.css');
OW::getDocument()->addScript(OW::getPluginManager()->getPlugin('photo')->getStaticJsUrl() . 'codemirror.min.js');
}