/** * @return string */ public function render() { $dateFormat = $this->getDateFormat(); if ($dateFormat !== null) { $dateFormat = sprintf(' "%s"', $dateFormat); } return parent::render() . $dateFormat; }
public function setOptions(array $options = array()) { if (isset($options['yes_label'])) { $this->setYesLabel($options['yes_label']); unset($options['yes_label']); } if (isset($options['no_label'])) { $this->setNoLabel($options['no_label']); unset($options['no_label']); } return parent::setOptions($options); }
/** * @return string */ public function getValidationRule() { $rule = parent::getValidationRule(); return $rule . '|regex:/\\A[0-9]+\\z/'; }
/** * @return string */ public function getValidationRule() { $rule = parent::getValidationRule(); return $rule . '|regex:/\\A[0-9]+\\z/|exists:' . $this->getForeignTable() . ',id'; }
public function __construct($header, $propertyName) { parent::__construct($header); $this->propertyName = $propertyName; }
/** * @param array $data * @return ColumnDt */ public function hydrate(array $data) { parent::hydrate($data); return $this->setServer((new ServerDt())->hydrate($data['server'])); }
/** * @param array $data * @return ColumnParams */ public function hydrate(array $data) { parent::hydrate($data); return $this->setSearch((new SearchParams())->hydrate($data['search'])); }
/** {@inheritdoc} */ protected function _parseDefault($data) { // Do not use the default from autoincrement columns. // See _isAutoIncrement() for an explanation. if (!$this->_isAutoIncrement($data)) { parent::_parseDefault($data); // Extract value from typed defaults if (preg_match("/^('(.*)'|NULL)::{$data['data_type']}\$/", $this->_default, $matches)) { if ($matches[1] == 'NULL') { $this->_default = null; } else { // String without surrounding quotes. Quote characters // within the string must be unescaped first. $this->_default = str_replace("''", "'", $matches[2]); } } } }