示例#1
0
 /**
  * In a variant, only variant and non-inherited fields can be marked as modified
  *
  * @param string $strKey
  */
 public function markModified($strKey)
 {
     if ($this->isVariant()) {
         $arrAttributes = array_diff($this->getVariantAttributes(), $this->getInheritedFields(), Attribute::getCustomerDefinedFields());
     } else {
         $arrAttributes = array_diff($this->getAttributes(), Attribute::getCustomerDefinedFields());
     }
     if (!in_array($strKey, $arrAttributes) && $GLOBALS['TL_DCA'][static::$strTable]['fields'][$strKey]['attributes']['legend'] != '') {
         return;
     }
     parent::markModified($strKey);
 }