コード例 #1
0
 /**
  * @param Element $row
  * @return string
  */
 public function rowOpen(Element $row)
 {
     $_atts = $this->htmlBuilder->attributes($row->getAttributes());
     return '<div' . $_atts . '><div class="row">';
 }
コード例 #2
0
ファイル: Form.php プロジェクト: iyoworks/form-builder
 /**
  * Dynamically set properties and settings
  * calling $form->add{Fieldtype}($slug [,$label]) will add a new field to the form
  *
  * @param  string $name Setting name
  * @param  array $arguments Setting value(s)
  *
  * @return $this|\Iyoworks\FormBuilder\Field
  */
 public function __call($name, $arguments)
 {
     if (preg_match("/add([A-Z][\\w]+)(After|Before)([A-Z][\\w]+)/", $name, $matched)) {
         $type = lcfirst($matched[1]);
         $isBefore = $matched[2] == 'Before';
         $reference = lcfirst($matched[3]);
         return $this->addDynamicField($type, $arguments, $reference, $isBefore);
     } elseif (preg_match("/add([A-Z][\\w]+)/", $name, $matched)) {
         $type = lcfirst($matched[1]);
         return $this->addDynamicField($type, $arguments);
     }
     return parent::__call($name, $arguments);
 }