コード例 #1
0
 /**
  * Parse the basic flags.
  *
  * @param BasicDefinitionInterface $config The basic definition of the data definition.
  *
  * @return void
  */
 protected function parseBasicFlags(BasicDefinitionInterface $config)
 {
     if (($switchToEdit = $this->getFromDca('config/switchToEdit')) !== null) {
         $config->setSwitchToEditEnabled((bool) $switchToEdit);
     }
     if (($value = $this->getFromDca('config/forceEdit')) !== null) {
         $config->setEditOnlyMode((bool) $value);
     }
     if (($value = $this->getFromDca('config/closed')) !== null) {
         $config->setEditable(!$value)->setCreatable(!$value);
     }
     if (($value = $this->getFromDca('config/notEditable')) !== null) {
         $config->setEditable(!$value);
     }
     if (($value = $this->getFromDca('config/notDeletable')) !== null) {
         $config->setDeletable(!$value);
     }
     if (($value = $this->getFromDca('config/notCreatable')) !== null) {
         $config->setCreatable(!(bool) $value);
     }
 }