Beispiel #1
0
 /**
  * Get all allowed ptables for a user.
  *
  * It is nessecary to register getAllowedDynamicParents events for the data container to set the ptables
  *
  * @return array
  *
  * @throws \RuntimeException
  */
 public function getAllowedDynamicParents()
 {
     if (!$this->definition->getFromDefinition('config/dynamicPtable')) {
         throw new \RuntimeException("DataContainer '{$this->definition->getName()}' does not have dynamic ptables");
     }
     $objEvent = new RestrictedDataAccessEvent($this);
     $this->dispatcher->dispatch('dcatools.tl_content.getAllowedDynamicParents', $objEvent);
     return $objEvent->getEntries();
 }