/** * Constructor. * * @param string $name */ public function __construct($name) { parent::__construct($name); $this->region = GOOGLELOCATION_BOL_LocationService::getInstance()->getLanguageCode(); $this->addAttribute('type', 'text'); $this->addAttribute('id', 'google_location_' . uniqid(rand(0, 999999))); $this->setHasInvitation(false); $this->addAttribute('class', ''); OW::getEventManager()->trigger(new OW_Event('googlelocation.add_js_lib')); }
/** * Constructor. * * @param string $name */ public function __construct($name, array $buttons = null, $init = true) { parent::__construct($name); $this->service = BOL_TextFormatService::getInstance(); $this->init = (bool) $init; if (!empty($buttons)) { $buttons = array_unique(array_merge($buttons, array(BOL_TextFormatService::WS_BTN_BOLD, BOL_TextFormatService::WS_BTN_ITALIC, BOL_TextFormatService::WS_BTN_UNDERLINE, BOL_TextFormatService::WS_BTN_LINK, BOL_TextFormatService::WS_BTN_ORDERED_LIST, BOL_TextFormatService::WS_BTN_UNORDERED_LIST))); } else { $buttons = array(BOL_TextFormatService::WS_BTN_BOLD, BOL_TextFormatService::WS_BTN_ITALIC, BOL_TextFormatService::WS_BTN_UNDERLINE, BOL_TextFormatService::WS_BTN_LINK, BOL_TextFormatService::WS_BTN_ORDERED_LIST, BOL_TextFormatService::WS_BTN_UNORDERED_LIST); } $this->buttons = $this->processButtons($buttons); $this->size = self::SIZE_M; if (OW::getRequest()->isMobileUserAgent()) { $this->textarea = new Textarea($name); } $stringValidator = new StringValidator(0, 50000); $stringValidator->setErrorMessage(OW::getLanguage()->text('base', 'text_is_too_long', array('max_symbols_count' => 50000))); $this->addValidator($stringValidator); }
/** * Constructor. * * @param string $name */ public function __construct($name) { parent::__construct($name); $this->addAttribute('type', 'text'); }