Пример #1
0
 public function AddDefinition(CustomAttribute $attribute)
 {
     $this->labels[] = $attribute->Label();
     $this->attribute_order[$attribute->Id()] = 1;
     if ($attribute->UniquePerEntity()) {
         $this->entityDefinitions[$attribute->EntityId()][$attribute->Id()] = $attribute;
         $this->entityAttributes[$attribute->Id()] = 1;
         //			Log::Debug('Adding custom attribute definition for entityId=%s, label=%s', $attribute->EntityId(), $attribute->Label());
     } else {
         $this->definitions[$attribute->Id()] = $attribute;
         //			Log::Debug('Adding custom attribute definition label=%s', $attribute->Label());
     }
 }
Пример #2
0
 /**
  * @return bool
  */
 public function UniquePerEntity()
 {
     return $this->attributeDefinition->UniquePerEntity();
 }