public function __construct($optionName, $templateName, tubepress_api_options_PersistenceInterface $persistence, tubepress_api_http_RequestParametersInterface $requestParams, tubepress_api_template_TemplatingInterface $templating, tubepress_api_options_ReferenceInterface $optionReference) { $this->_optionProvider = $optionReference; $this->_templateName = $templateName; $this->_optionName = $optionName; if (!$this->_optionProvider->optionExists($optionName)) { throw new InvalidArgumentException(sprintf('Could not find option with name "%s"', $optionName)); } $label = $this->_optionProvider->getUntranslatedLabel($optionName); $description = $this->_optionProvider->getUntranslatedDescription($optionName); parent::__construct($optionName, $persistence, $requestParams, $templating, $label, $description); }
public function __construct(tubepress_api_options_PersistenceInterface $persistence, tubepress_api_http_RequestParametersInterface $requestParams, tubepress_api_template_TemplatingInterface $templating, tubepress_api_options_ReferenceInterface $optionsReference) { $optionName = tubepress_api_options_Names::OPTIONS_UI_DISABLED_FIELD_PROVIDERS; parent::__construct(self::FIELD_ID, $persistence, $requestParams, $templating, $optionsReference->getUntranslatedLabel($optionName), $optionsReference->getUntranslatedDescription($optionName)); }