本文整理汇总了PHP中Zend\Form\Element\Select::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP Select::__construct方法的具体用法?PHP Select::__construct怎么用?PHP Select::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Zend\Form\Element\Select
的用法示例。
在下文中一共展示了Select::__construct方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct(\Product\Service\ProductAttributeService $service, \Zend\Mvc\I18n\Translator $translator, $is_user_defined = true)
{
parent::__construct();
$this->service = $service;
$this->translator = $translator;
$this->is_user_defined = $is_user_defined;
}
示例2: __construct
/**
* __construct
*
* @param string $name
* @param array $options
*/
public function __construct($name = null, $options = [])
{
if (null === $name) {
$name = 'locale-select';
}
parent::__construct($name, $options);
}
示例3: __construct
/**
* @param string[] $selectableLocales
* @param string $defaultLocale
*/
public function __construct(array $selectableLocales, $defaultLocale)
{
parent::__construct();
$valueOptions = [];
foreach ($selectableLocales as $locale) {
$valueOptions[$locale] = sprintf('%s (%s)', Locale::getDisplayLanguage($locale), Locale::getDisplayRegion($locale));
}
$collator = new Collator(Locale::getDefault());
$collator->asort($valueOptions);
$this->setValueOptions($valueOptions);
$this->setValue($defaultLocale);
}
示例4: __construct
public function __construct(\Product\Service\ProductTypeService $service, \Zend\Mvc\I18n\Translator $translator)
{
parent::__construct();
$this->service = $service;
$this->translator = $translator;
}
示例5: __construct
public function __construct(LegalformService $legalformService, \Zend\Mvc\I18n\Translator $translator)
{
parent::__construct();
$this->legalform = $legalformService;
$this->translator = $translator;
}
示例6: __construct
/**
* @param ClientRepository $clientRepository
*/
public function __construct(ClientRepository $clientRepository)
{
$this->clientRepository = $clientRepository;
parent::__construct();
}
示例7: __construct
public function __construct()
{
parent::__construct();
$this->setValueOptions(['' => 'None', 'hours' => 'Hours', 'days' => 'Days']);
}
示例8: __construct
public function __construct(ContactTypeService $contacttypeService, \Zend\Mvc\I18n\Translator $translator)
{
parent::__construct();
$this->contacttype = $contacttypeService;
$this->translator = $translator;
}
示例9: __construct
public function __construct(\Zend\Mvc\I18n\Translator $translator)
{
$this->translator = $translator;
parent::__construct();
}
示例10: __construct
public function __construct(CustomerGroupService $service, \Zend\Mvc\I18n\Translator $translator)
{
parent::__construct();
$this->service = $service;
$this->translator = $translator;
}
示例11: __construct
public function __construct($name = null, $options = [])
{
$this->attributes['id'] = uniqid();
parent::__construct($name, $options);
}
示例12: __construct
public function __construct(PageCategoryService $pagecategoryService, \Zend\Mvc\I18n\Translator $translator)
{
parent::__construct();
$this->pagecategoryService = $pagecategoryService;
$this->translator = $translator;
}
示例13: __construct
public function __construct($serviceFinder = null)
{
parent::__construct('select');
//$this->languagesServiceFinder = $serviceFinder;
$this->setValueOptions(['id' => 2]);
}
示例14: __construct
/**
* Construct the object.
*
* @param ServiceLocatorInterface $serviceLocator
* @param string $name Optional name for the form (and CSRF name)
* @param array $options Optional options for the form
*/
public function __construct(ServiceLocatorInterface $serviceLocator, $name = null, $options = [])
{
$this->setServiceLocator($serviceLocator);
parent::__construct($name, $options);
}
示例15: __construct
public function __construct(ProfileCategoryService $eventcategoryService, \Zend\Mvc\I18n\Translator $translator)
{
parent::__construct();
$this->eventcategoryService = $eventcategoryService;
$this->translator = $translator;
}