public function __construct(CountryList $countryList, $label = 'Country') { $this->_countryList = $countryList; $choices = $this->_getCountryChoices(); $this->setFormChoices($choices); parent::__construct(self::NAME, $label, null, true); }
public function __construct($label = 'Address type', array $choices = null) { if (null === $choices) { $choices = ['all' => 'All', 'delivery' => 'Delivery', 'billing' => 'Billing']; } $this->setFormChoices($choices); parent::__construct(self::NAME, $label, null, true); }
/** * Set form choices in constructor and get name and label from child class */ public function __construct() { $this->setFormChoices(['yes' => 'Yes', 'no' => 'No']); parent::__construct($this->_getName(), $this->_getLabel()); }
public function __construct($label = 'Brands', array $choices = []) { $this->setFormChoices($choices); parent::__construct(self::NAME, $label, null, true); }