Ejemplo n.º 1
0
 /**
  * Method to perform batch operations on an item or a set of items.
  *
  * @param   array  $commands  An array of commands to perform.
  * @param   array  $pks       An array of item ids.
  * @param   array  $contexts  An array of item contexts.
  *
  * @return  boolean  Returns true on success, false on failure.
  *
  * @since   11.1
  */
 public function batch($commands = null, $pks = null, $contexts = null)
 {
     // make keys to array
     $pks = $this->_getPrimaryKeys($pks);
     $commands = JRequest::getVar('commands', $commands);
     // build Contexts
     foreach ($pks as $pk) {
         $contexts[$pk] = $option . '.' . $this->item_name . '.' . $id;
     }
     // Execute parent
     $result = parent::batch($commands, $pks, $contexts);
     // Build Return Object
     return $this->_setReturnValue($result);
 }