本文整理汇总了PHP中Kwc_Abstract_Composite_Component::validateSettings方法的典型用法代码示例。如果您正苦于以下问题:PHP Kwc_Abstract_Composite_Component::validateSettings方法的具体用法?PHP Kwc_Abstract_Composite_Component::validateSettings怎么用?PHP Kwc_Abstract_Composite_Component::validateSettings使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Kwc_Abstract_Composite_Component
的用法示例。
在下文中一共展示了Kwc_Abstract_Composite_Component::validateSettings方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: validateSettings
public static function validateSettings($settings, $componentClass)
{
parent::validateSettings($settings, $componentClass);
if (!isset($settings['videoWidth'])) {
throw new Kwf_Exception("videoWidth setting has to be set. Component: '{$componentClass}'");
}
if (!isset($settings['playerVars'])) {
throw new Kwf_Exception("playerVars setting has to be set. Component: '{$componentClass}'");
}
}
示例2: validateSettings
public static function validateSettings($settings, $componentClass)
{
parent::validateSettings($settings, $componentClass);
// wenn es eine Form.php gibt aber keine FrontendForm.php
// sollte man aus irgendeinem grund doch eine Form benutzen ohne FrontendForm
// dann einfach validateSettings überschreiben und parent nicht aufrufen
$frontendFormClass = Kwc_Admin::getComponentClass($componentClass, 'FrontendForm');
$formClass = Kwc_Admin::getComponentClass($componentClass, 'Form');
if ($formClass != 'Kwc_Abstract_Composite_Form' && !$frontendFormClass) {
throw new Kwf_Exception("Form.php files for frontend have been renamed to FrontendForm.php");
}
if ($frontendFormClass && is_instance_of($frontendFormClass, 'Kwc_Abstract_Form')) {
throw new Kwf_Exception("A frontend form may never be an instance of Kwc_Abstract_Form");
}
}