Exemplo n.º 1
0
 public function testRemove()
 {
     $objDc = $this->objProperty->getDataContainer();
     $this->objProperty->remove();
     $this->assertFalse($objDc->hasProperty('test'));
     $this->assertFalse(isset($GLOBALS['TL_DCA']['tl_test']['fields']['test']));
 }
Exemplo n.º 2
0
 /**
  * Get activated
  *
  * @param Property $objProperty
  * @param ModelInterface $objModel
  *
  * @return Definition\SubPalette|null
  */
 public static function getActivePropertySubPalette(Property $objProperty, ModelInterface $objModel)
 {
     $objProperty->getDataContainer();
     $varValue = $objModel->getProperty($objProperty->getName());
     if ($objProperty->hasSubPalette($varValue)) {
         return $objProperty->getSubPalette($varValue);
     }
     return null;
 }