/** * @param Element $row * @return string */ public function rowOpen(Element $row) { $_atts = $this->htmlBuilder->attributes($row->getAttributes()); return '<div' . $_atts . '><div class="row">'; }
/** * 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); }