You are here

class MultipleEntityQueueHandler in Entityqueue 7

A multiple subqueue queue implementation.

Hierarchy

Expanded class hierarchy of MultipleEntityQueueHandler

1 string reference to 'MultipleEntityQueueHandler'
multiple.inc in plugins/entityqueue/handler/multiple.inc

File

plugins/entityqueue/handler/MultipleEntityQueueHandler.class.php, line 11
Contains Entityqueue handler for simple queues with multiple subqueues.

View source
class MultipleEntityQueueHandler extends SimpleEntityQueueHandler {

  /**
   * {@inheritdoc}
   */
  public function subqueueForm(EntitySubqueue $subqueue, &$form_state) {
    $values = (array) $subqueue;
    if (isset($form_state['values']) && !empty($form_state['values'])) {
      $values = $form_state['values'] + $values;
    }
    $form = array();
    $form['label'] = array(
      '#type' => 'textfield',
      '#title' => t('Subqueue label'),
      '#required' => TRUE,
      '#default_value' => isset($values['label']) ? $values['label'] : '',
    );
    $form['name'] = array(
      '#type' => 'machine_name',
      '#title' => t('Subqueue name'),
      '#required' => TRUE,
      '#default_value' => isset($values['name']) ? $values['name'] : '',
      '#machine_name' => array(
        'exists' => 'entityqueue_subqueue_load',
        'source' => array(
          'label',
        ),
      ),
      '#disabled' => isset($subqueue->subqueue_id),
    );
    return $form;
  }

  /**
   * {@inheritdoc}
   */
  public function loadFromCode() {
  }

  /**
   * {@inheritdoc}
   */
  public function insert() {
  }

  /**
   * {@inheritdoc}
   */
  public function canDeleteSubqueue(EntitySubqueue $subqueue) {
    return TRUE;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
EntityQueueHandlerBase::$plugin protected property The handler plugin definition.
EntityQueueHandlerBase::$queue protected property The EntityQueue object.
EntityQueueHandlerBase::create public function Act on creating a queue. Overrides EntityQueueHandlerInterface::create
EntityQueueHandlerBase::getHandlerLabel public function Returns the label of the queue's handler. Overrides EntityQueueHandlerInterface::getHandlerLabel 1
EntityQueueHandlerBase::getInstance public static function Factory function: creates a new instance of this handler for a queue. Overrides EntityQueueHandlerInterface::getInstance 1
EntityQueueHandlerBase::getTargetTypeLabel public function Returns the entity type label of a queue target type. Overrides EntityQueueHandlerInterface::getTargetTypeLabel
EntityQueueHandlerBase::load public function Act on loading a queue. Overrides EntityQueueHandlerInterface::load
EntityQueueHandlerBase::postDelete public function Act after deleting a queue. Overrides EntityQueueHandlerInterface::postDelete
EntityQueueHandlerBase::preDelete public function Act before deleting a queue. Overrides EntityQueueHandlerInterface::preDelete
EntityQueueHandlerBase::preSave public function Act before a queue is saved. Overrides EntityQueueHandlerInterface::preSave
EntityQueueHandlerBase::settingsForm public function Generates a settings form for this handler. Overrides EntityQueueHandlerInterface::settingsForm 1
EntityQueueHandlerBase::update public function Act after a queue is updated. Overrides EntityQueueHandlerInterface::update
EntityQueueHandlerBase::__construct protected function
MultipleEntityQueueHandler::canDeleteSubqueue public function Returns TRUE if subqueue can be deleted, otherwise returns FALSE. Overrides SimpleEntityQueueHandler::canDeleteSubqueue
MultipleEntityQueueHandler::insert public function Act after a new queue is saved. Overrides SimpleEntityQueueHandler::insert
MultipleEntityQueueHandler::loadFromCode public function Act on loading a queue that is defined only in code. Overrides SimpleEntityQueueHandler::loadFromCode
MultipleEntityQueueHandler::subqueueForm public function Generates an add/edit subqueue form for this handler. Overrides EntityQueueHandlerBase::subqueueForm
SimpleEntityQueueHandler::ensureSubqueue protected function Makes sure that every simple queue has a subqueue.
SimpleEntityQueueHandler::getSubqueueLabel public function Returns the label of a given subqueue. Overrides EntityQueueHandlerBase::getSubqueueLabel