protected function getPostedAction($message = true)
    {
        $action = $this->getPosted('action', array(), true, 'array');

        if (!empty($action)) {

            if (empty($action['name'])) {
                $error = $this->text('An error occurred');
            } else if (empty($action['items'])) {
                $error = $this->text('Please select at least one item');
            } else {
                $parts = explode('|', $action['name'], 2);
                return array($action['items'], $parts[0], isset($parts[1]) ? $parts[1] : null);
            }

            if (isset($error) && $message) {
                $this->setMessage($error, 'warning');
            }
        }

        return array(array(), null, null);
    }
protected function getPostedAction($message = true)
    {
        $action = $this->getPosted('action', array(), true, 'array');

        if (!empty($action)) {

            if (empty($action['name'])) {
                $error = $this->text('An error occurred');
            } else if (empty($action['items'])) {
                $error = $this->text('Please select at least one item');
            } else {
                $parts = explode('|', $action['name'], 2);
                return array($action['items'], $parts[0], isset($parts[1]) ? $parts[1] : null);
            }

            if (isset($error) && $message) {
                $this->setMessage($error, 'warning');
            }
        }

        return array(array(), null, null);
    }
protected function getPostedAction ( $ message = true ) { $ action = $ this -> getPosted ( 'action' , array ( ) , true , 'array' ) ; if ( ! empty ( $ action ) ) { if ( empty ( $ action [ 'name' ] ) ) { $ error = $ this -> text ( 'An error occurred' ) ; } else if ( empty ( $ action [ 'items' ] ) ) { $ error = $ this -> text ( 'Please select at least one item' ) ; } else { $ parts = explode ( '|' , $ action [ 'name' ] , 2 ) ; return array ( $ action [ 'items' ] , $ parts [ 0 ] , isset ( $ parts [ 1 ] ) ? $ parts [ 1 ] : null ) ; } if ( isset ( $ error ) && $ message ) { $ this -> setMessage ( $ error , 'warning' ) ; } } return array ( array ( ) , null , null ) ; }
Returns an array of submitted bulk action
@param bool $message
@return array
Returns an array of submitted bulk action