예제 #1
0
 protected function LoadValidators($action)
 {
     if ($action == ManageResourcesActions::ActionChangeAttributes) {
         $attributes = $this->GetAttributeValues();
         $this->page->RegisterValidator('attributeValidator', new AttributeValidator($this->attributeService, CustomAttributeCategory::RESOURCE, $attributes, $this->page->GetResourceId()));
     }
     if ($action == ManageResourcesActions::ActionBulkUpdate) {
         $attributes = $this->GetAttributeValues();
         $this->page->RegisterValidator('bulkAttributeValidator', new AttributeValidator($this->attributeService, CustomAttributeCategory::RESOURCE, $attributes, null, true));
     }
 }