/** * Register a new Action with this form, renders it and return the HTML code */ public function registerAndRenderAction(Action $action) { $this->ensureIdIsUnique($action->id); $this->ensureHandlerHasAction($action->id); $this->actions[$action->id] = $action; return $action->render(); }
public function __construct(array $attributes, $content) { parent::__construct($attributes); if (!$content) { throw new ConfigurationException(sprintf('Missing content for Button: %s', $this->id)); } $this->content = $content; }
public function __construct(array $attributes) { parent::__construct($attributes); $this->value = $this->requiredAttribute('value'); }