|
|
|
|
|
|
|
|
public function configureActions(Actions $actions): Actions |
|
|
public function configureActions(Actions $actions): Actions |
|
|
{ |
|
|
{ |
|
|
$actions = parent::configureActions($actions); |
|
|
$actions = parent::configureActions($actions); |
|
|
|
|
|
|
|
|
if(!$this->getSectionCurrent()) { |
|
|
|
|
|
$actions->disable(ActionDefinition::NEW, ActionDefinition::EDIT, ActionDefinition::DUPLICATE,ActionDefinition::DUPLICATE_TO_OTHER_SECTION, ActionDefinition::DELETE); |
|
|
|
|
|
}else{ |
|
|
|
|
|
$actions->disable( ActionDefinition::EDIT, ActionDefinition::DUPLICATE,ActionDefinition::DUPLICATE_TO_OTHER_SECTION, ActionDefinition::DELETE); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
$actions->disable( ActionDefinition::EDIT, ActionDefinition::DUPLICATE,ActionDefinition::DUPLICATE_TO_OTHER_SECTION, ActionDefinition::DELETE); |
|
|
|
|
|
|
|
|
return $actions; |
|
|
return $actions; |
|
|
} |
|
|
} |