/** * Override to only show MassDeleteLink if in the byTime or message queue views * @param ActionElement $element * @param array $elementInformation * @return bool */ protected function shouldRenderToolBarElement($element, $elementInformation) { assert('$element instanceof ActionElement'); assert('is_array($elementInformation)'); if (!parent::shouldRenderToolBarElement($element, $elementInformation)) { return false; } if ($elementInformation['type'] == 'MassDeleteMenu' && 'ByTimeWorkflowInQueue' != get_class($this->model) && 'WorkflowMessageInQueue' != get_class($this->model)) { return false; } return true; }