Пример #1
0
 /**
  * Constructor.
  *
  * @param Doozr_Form_Service_Renderer_Interface $renderer Renderer instance for rendering this component
  * @param Doozr_Form_Service_Component_Legend   $legend   The legend to add
  *
  * @author Benjamin Carl <*****@*****.**>
  *
  * @return \Doozr_Form_Service_Component_Fieldset
  */
 public function __construct(Doozr_Form_Service_Renderer_Interface $renderer = null, Doozr_Form_Service_Component_Legend $legend = null)
 {
     if ($legend !== null) {
         $this->setLegend($legend);
     }
     // Important call so observer storage ... can be initiated
     parent::__construct($renderer);
 }
Пример #2
0
 /**
  * Constructor.
  *
  * @param Doozr_Form_Service_Renderer_Interface                                                     $renderer
  * @param Doozr_Form_Service_Validator_Interface                                                    $validator
  * @param Doozr_Form_Service_Component_Interface_Html|Doozr_Form_Service_Component_Interface_Html[] $label     0 to n Label
  * @param Doozr_Form_Service_Component_Interface_Html|Doozr_Form_Service_Component_Interface_Html[] $component 0 to n Components
  * @param Doozr_Form_Service_Component_Message|Doozr_Form_Service_Component_Message[]               $message   0 to n Message components
  *
  * @author Benjamin Carl <*****@*****.**>
  *
  * @return Doozr_Form_Service_Component_Group $this
  */
 public function __construct(Doozr_Form_Service_Renderer_Interface $renderer = null, Doozr_Form_Service_Validator_Interface $validator = null, $label = null, $component = null, $message = null)
 {
     // Parse label if set ...
     if ($label !== null) {
         // Check for collection or single item ...
         if (is_array($label)) {
             foreach ($label as $singleLabel) {
                 $this->addLabel($singleLabel);
             }
         } else {
             $this->addLabel($label);
         }
     }
     // Parse component if set ...
     if (null !== $component) {
         // Check for collection or single item ...
         if (is_array($component)) {
             foreach ($component as $singleComponent) {
                 $this->addComponent($singleComponent);
             }
         } else {
             $this->addComponent($component);
         }
     }
     #if ($message instanceof Doozr_Form_Service_Component_Message) {
     // Parse message if set ...
     if (null !== $message) {
         // Check for collection or single item ...
         if (is_array($message)) {
             foreach ($message as $singleMessage) {
                 $this->addMessage($singleMessage);
             }
         } else {
             $this->addMessage($message);
         }
     }
     parent::__construct($renderer, $validator);
     // automagic management
     $this->wire();
 }
Пример #3
0
 /**
  * Constructor.
  *
  * @param Doozr_Form_Service_Renderer_Interface  $renderer  Renderer instance for rendering this component
  * @param Doozr_Form_Service_Validator_Interface $validator Validator instance for validating this component
  * @param string|null                            $name      Name/identifier of form
  *
  * @author Benjamin Carl <*****@*****.**>
  */
 public function __construct(Doozr_Form_Service_Renderer_Interface $renderer = null, Doozr_Form_Service_Validator_Interface $validator = null, $name = null)
 {
     if (null !== $name) {
         $this->setName($name);
     }
     // Important call so observer storage ... can be initiated
     parent::__construct($renderer, $validator);
 }
Пример #4
0
 /**
  * Constructor.
  *
  * @param Doozr_Form_Service_Renderer_Interface $renderer Renderer instance for rendering this component
  * @param string                                $message  The message to set
  *
  * @author Benjamin Carl <*****@*****.**>
  *
  * @return \Doozr_Form_Service_Component_Legend
  */
 public function __construct(Doozr_Form_Service_Renderer_Interface $renderer = null, $message = null)
 {
     if ($message !== null) {
         $this->setInnerHtml($message);
     }
     // Important call so observer storage ... can be initiated
     parent::__construct($renderer);
 }
Пример #5
0
 /**
  * Constructor.
  *
  * @param Doozr_Form_Service_Renderer_Interface $renderer Renderer instance for rendering this component
  *
  * @author Benjamin Carl <*****@*****.**>
  *
  * @return \Doozr_Form_Service_Component_Div
  */
 public function __construct(Doozr_Form_Service_Renderer_Interface $renderer = null)
 {
     // Important call so observer storage ... can be initiated
     parent::__construct($renderer);
 }