Ejemplo n.º 1
0
 /**
  * Retrieve list of locked fields for attribute
  *
  * @param AbstractAttribute $attribute
  * @return array
  */
 public function getLockedFields(AbstractAttribute $attribute)
 {
     $allFields = $this->get($attribute->getEntityType()->getEntityTypeCode() . '/attributes/' . $attribute->getAttributeCode());
     if (!is_array($allFields)) {
         return [];
     }
     $lockedFields = [];
     foreach (array_keys($allFields) as $fieldCode) {
         $lockedFields[$fieldCode] = $fieldCode;
     }
     return $lockedFields;
 }