public function __construct($identifier = NULL)
 {
     if ($identifier !== 'disable' && $identifier !== 'enable') {
         throw new \InvalidArgumentException(sprintf('%s: module identifier must be one of "disable" or "enable".', get_class($this)), 1325579325);
     }
     parent::__construct($identifier);
 }
Esempio n. 2
0
 /**
  * Create a Modify instance that realizes one of the allowed behaviours:
  * 
  * - create
  * - delete
  * - update
  * 
  * @param string $identifier One of 'create', 'delete', 'update'
  * @param array $parameterSchema - DEPRECATED
  * @param mixed $viewTemplate - DEPRECATED 
  * @throws \InvalidArgumentException 
  */
 public function __construct($identifier, $parameterSchema = NULL, $viewTemplate = NULL)
 {
     if (!in_array($identifier, array('create', 'delete', 'update'))) {
         throw new \InvalidArgumentException(sprintf('%s: Module identifier must be one of `create`, `delete`, `update` values.', get_class($this)), 1322149372);
     }
     parent::__construct($identifier);
     if (!is_null($viewTemplate)) {
         $this->setViewTemplate($viewTemplate);
     }
     if (!is_null($parameterSchema)) {
         $this->setSchema($parameterSchema);
     }
 }