You are here

ShowUsage.php in CMS Content Sync 8

Same filename and directory in other branches
  1. 2.1.x src/Controller/ShowUsage.php
  2. 2.0.x src/Controller/ShowUsage.php

File

src/Controller/ShowUsage.php
View source
<?php

namespace Drupal\cms_content_sync\Controller;

use Drupal\Core\Controller\ControllerBase;

/**
 * Push changes controller.
 */
class ShowUsage extends ControllerBase {

  /**
   * @param $entity_id
   * @param $entity_type
   * @param mixed $entity
   *
   * @return array the content array to theme the introduction
   */
  public function content($entity, $entity_type) {
    $entity = \Drupal::entityTypeManager()
      ->getStorage($entity_type)
      ->load($entity);
    return [
      '#usage' => _cms_content_sync_display_pool_usage($entity),
      '#theme' => 'cms_content_sync_show_usage',
    ];
  }

}

Classes

Namesort descending Description
ShowUsage Push changes controller.