public function UpdateAttribute()
 {
     $attributeId = $this->page->GetAttributeId();
     $attributeName = $this->page->GetLabel();
     $regex = $this->page->GetValidationExpression();
     $required = $this->page->GetIsRequired();
     $possibleValues = $this->page->GetPossibleValues();
     $sortOrder = $this->page->GetSortOrder();
     $entityId = $this->page->GetEntityId();
     Log::Debug('Updating attribute with id: %s', $attributeId);
     $attribute = $this->attributeRepository->LoadById($attributeId);
     $attribute->Update($attributeName, $regex, $required, $possibleValues, $sortOrder, $entityId);
     $this->attributeRepository->Update($attribute);
 }
示例#2
0
 public function GetById($attributeId)
 {
     return $this->attributeRepository->LoadById($attributeId);
 }