You are here

class DeployAggregatorManaged in Deploy - Content Staging 7.3

Same name and namespace in other branches
  1. 7.2 plugins/DeployAggregatorManaged.inc \DeployAggregatorManaged

Managed deployment aggregator.

Hierarchy

Expanded class hierarchy of DeployAggregatorManaged

9 string references to 'DeployAggregatorManaged'
deploy_deploy_aggregators in ./deploy.deploy.inc
Implements hook_deploy_aggregators().
deploy_drush_command in ./deploy.drush.inc
Implements hook_drush_command().
deploy_example_deploy_plans_default in modules/deploy_example/deploy_example.deploy_plans.inc
Implements hook_deploy_plans_default().
deploy_manager_plan_get_options in ./deploy.manager.inc
Options callback for the deploy_plan data type.
deploy_manager_plan_load in ./deploy.manager.inc
Loads a managed plan with the given name, returns false if no such plan exists.

... See full list

File

plugins/DeployAggregatorManaged.inc, line 10
Managed entities Deploy aggregator plugin.

View source
class DeployAggregatorManaged extends DeployAggregatorBase {

  /**
   * Configuration data.
   * @var array
   */
  public $config = array();

  /**
   * Holds a reference to the plan object that initiated it.
   *
   * @var DeployPlan
   */
  public $plan;

  /**
   * {@inheritdoc}
   */
  public function __construct(DeployPlan $plan = NULL, array $config = array()) {
    $this->config += array(
      'debug' => FALSE,
      'delete_post_deploy' => FALSE,
    );
    $this->config = array_merge($this->config, $config);
    $this->plan = $plan;
  }

  /**
   * Get aggregated entities.
   */
  public function getEntities() {
    return deploy_manager_get_entities($this->plan->name);
  }

  /**
   * {@inheritdoc}
   */
  public function configForm(&$form_state) {
    $form = array();
    $form['delete_post_deploy'] = array(
      '#type' => 'checkbox',
      '#title' => t('Delete successfully deployed entities from the plan'),
      '#description' => t('If checked, each successfully deployed entity will be automatically deleted from the plan.'),
      '#default_value' => $this->config['delete_post_deploy'],
    );
    return $form;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
DeployAggregatorBase::getIterator public function Returns a DeployIteratorIterator, which can iterate through recursive iterators
DeployAggregatorManaged::$config public property Configuration data.
DeployAggregatorManaged::$plan public property Holds a reference to the plan object that initiated it.
DeployAggregatorManaged::configForm public function Defines the configuration form for the aggregator. Overrides DeployAggregatorBase::configForm
DeployAggregatorManaged::getEntities public function Get aggregated entities. Overrides DeployAggregatorBase::getEntities
DeployAggregatorManaged::__construct public function Constructor for a deploy aggregator. Overrides DeployAggregatorBase::__construct