Inheritance: extends BaseRowOperation
コード例 #1
0
 protected function AddOperationsColumns(Grid $grid)
 {
     $actions = $grid->getActions();
     $actions->setCaption($this->GetLocalizerCaptions()->GetMessageString('Actions'));
     $actions->setPosition(ActionList::POSITION_LEFT);
     if ($this->GetSecurityInfo()->HasViewGrant()) {
         $operation = new LinkOperation($this->GetLocalizerCaptions()->GetMessageString('View'), OPERATION_VIEW, $this->dataset, $grid);
         $operation->setUseImage(true);
         $actions->addOperation($operation);
     }
     if ($this->GetSecurityInfo()->HasEditGrant()) {
         $operation = new LinkOperation($this->GetLocalizerCaptions()->GetMessageString('Edit'), OPERATION_EDIT, $this->dataset, $grid);
         $operation->setUseImage(true);
         $actions->addOperation($operation);
         $operation->OnShow->AddListener('ShowEditButtonHandler', $this);
     }
     if ($this->GetSecurityInfo()->HasDeleteGrant()) {
         $operation = new LinkOperation($this->GetLocalizerCaptions()->GetMessageString('Delete'), OPERATION_DELETE, $this->dataset, $grid);
         $operation->setUseImage(true);
         $actions->addOperation($operation);
         $operation->OnShow->AddListener('ShowDeleteButtonHandler', $this);
         $operation->SetAdditionalAttribute('data-modal-operation', 'delete');
         $operation->SetAdditionalAttribute('data-delete-handler-name', $this->GetModalGridDeleteHandler());
     }
     if ($this->GetSecurityInfo()->HasAddGrant()) {
         $operation = new LinkOperation($this->GetLocalizerCaptions()->GetMessageString('Copy'), OPERATION_COPY, $this->dataset, $grid);
         $operation->setUseImage(true);
         $actions->addOperation($operation);
     }
 }
コード例 #2
0
 protected function AddOperationsColumns(Grid $grid)
 {
     $actions = $grid->getActions();
     $actions->setCaption($this->GetLocalizerCaptions()->GetMessageString('Actions'));
     $actions->setPosition(ActionList::POSITION_LEFT);
     if ($this->GetSecurityInfo()->HasViewGrant()) {
         $operation = new LinkOperation($this->GetLocalizerCaptions()->GetMessageString('View'), OPERATION_VIEW, $this->dataset, $grid);
         $operation->setUseImage(true);
         $actions->addOperation($operation);
     }
 }