コード例 #1
0
ファイル: Recaptcha.php プロジェクト: jmversteeg/fieldwork
 public function getAttributes()
 {
     $attributes = array_merge(parent::getAttributes(), array('data-sitekey' => $this->siteKey));
     unset($attributes['value']);
     unset($attributes['name']);
     return $attributes;
 }
コード例 #2
0
ファイル: SelectBox.php プロジェクト: jmversteeg/fieldwork
 public function getAttributes()
 {
     $attributes = parent::getAttributes();
     if ($this->isMultipleAllowed) {
         $attributes['multiple'] = 'multiple';
     }
     return $attributes;
 }
コード例 #3
0
ファイル: Checkbox.php プロジェクト: jmversteeg/fieldwork
 public function getAttributes()
 {
     $attrs = array('type' => 'checkbox', 'value' => self::ON);
     if ($this->isChecked()) {
         $attrs[self::CHECKED] = self::CHECKED;
     }
     return array_merge(parent::getAttributes(), $attrs);
 }
コード例 #4
0
ファイル: TextField.php プロジェクト: jmversteeg/fieldwork
 public function getAttributes()
 {
     $att = array();
     if (!empty($this->onEnter)) {
         $att['data-input-action-on-enter'] = $this->onEnter;
     }
     if ($this->mask !== null) {
         $att['data-input-mask'] = $this->mask;
     }
     return array_merge(parent::getAttributes(), $att);
 }
コード例 #5
0
ファイル: InputField.php プロジェクト: rsky/symfony
 /**
  * {@inheritDoc}
  */
 public function getAttributes()
 {
     return array_merge(parent::getAttributes(), array('id' => $this->getId(), 'name' => $this->getName(), 'value' => $this->getDisplayedData(), 'disabled' => $this->isDisabled(), 'type' => $this->getOption('type')));
 }
コード例 #6
0
ファイル: Textarea.php プロジェクト: jmversteeg/fieldwork
 public function getAttributes()
 {
     return array_merge(parent::getAttributes(), array('placeholder' => $this->label));
 }
コード例 #7
0
ファイル: TextareaField.php プロジェクト: netixpro/symfony
 /**
  * {@inheritDoc}
  */
 public function getAttributes()
 {
     return array_merge(parent::getAttributes(), array('id' => $this->getId(), 'name' => $this->getName(), 'rows' => 4, 'cols' => 30));
 }
コード例 #8
0
ファイル: ElementsGenerator.php プロジェクト: laasti/form
 protected static function renderButtonInput(Field $field)
 {
     return sprintf('<button type="%s" name="%s" value="%s" %s>%s</button>', $field->getType(), $field->getName(), $field->getValue(), $field->getAttributes(), $field->getLabel());
 }
コード例 #9
0
ファイル: HiddenField.php プロジェクト: jmversteeg/fieldwork
 public function getAttributes()
 {
     return array_merge(parent::getAttributes(), ["type" => "hidden"]);
 }