public function __construct($name, $content = null) { parent::__construct($name); if (is_string($content)) { $this->setContent($content); } }
protected function confirmedTitle(Form $form, Field $field, $property) { $fieldName = $field->getName(); // If in some lang file the confirmation key is excplicit setted if ($directHit = $this->getFirstMatch($this->relativeKey($form, $field, $property))) { return $directHit; } // Otherwise try to translate the confirmation text with the source field // name // If no confirm key setted break if (!($confirmKey = $this->getFirstMatchedKey("forms.base.field_confirmed"))) { return; } $sourceFieldName = str_replace('_confirmation', '', $fieldName); $sourceRelativeKey = $this->relativeKey($form, $form->get($sourceFieldName), $property); // If the source field is not named break if (!($sourceTitle = $this->getFirstMatch($sourceRelativeKey))) { return; } return $this->lang->get($confirmKey, ['attribute' => $sourceTitle]); }
public function copy($prefix = '') { $copy = parent::copy($prefix); $copy->setMultiLine($this->isMultiLine()); return $copy; }
public function isLastField(Field $field) { $last = count($this->keyOrder) - 1; if (isset($this->keyOrder[$last])) { if ($this->keyOrder[$last] == $field->getName()) { return TRUE; } } return FALSE; }
public function copy() { $copy = parent::copy(); if ($this->columns) { $copy->setColumns($this->columns); } if ($this->grouper) { $copy->setGrouper($this->grouper); } $copy->setSrc($this->src, $this->manualExtractor); return $copy; }
protected function updateAttributes(Attributes $attributes) { parent::updateAttributes($attributes); $attributes->set('type', 'hidden'); $attributes->set('value', $this->value); }
public function copy($prefix = '') { $copy = parent::copy($prefix); foreach ($this as $field) { $copy->push($field->copy($prefix)); } return $copy; }
public function copy($prefix = '') { $copy = parent::copy($prefix); if ($this->columns) { $copy->setColumns($this->columns); } $copy->setSrc($this->getSrc(), $this->manualExtractor); return $copy; }
protected function getCacheId(Form $form, Field $field, $property) { return $form->getName() . '|' . $field->getName() . "|{$property}"; }
protected function fieldKey(Field $field) { return str_replace('__', '.', $field->getName()); }
public function __toString_() { $res = parent::__toString(); die('Karpotten'); }
public function setName($name) { $cleanedName = str_replace('action_', '', $name); $this->value = $cleanedName; return parent::setName("action_{$cleanedName}"); }