class FileCount

Field handler which shows the file count for a job or job item.

Plugin annotation

@ViewsField("tmgmt_filecount");

Hierarchy

  • class \Drupal\tmgmt\Plugin\views\field\StatisticsBase extends \Drupal\views\Plugin\views\field\FieldPluginBase
    • class \Drupal\tmgmt\Plugin\views\field\FileCount

Expanded class hierarchy of FileCount

File

src/Plugin/views/field/FileCount.php, line 13

Namespace

Drupal\tmgmt\Plugin\views\field
View source
class FileCount extends StatisticsBase {

  /**
   * {@inheritdoc}
   */
  public function render(ResultRow $values) {
    $entity = $this
      ->getEntity($values);
    return $entity
      ->getFileCount();
  }

  /**
   * {@inheritdoc}
   */
  public function access(AccountInterface $account) {
    if (!\Drupal::service('plugin.manager.tmgmt.translator')
      ->supportsFiles()) {
      return FALSE;
    }
    return parent::access($account);
  }

}

Members

Namesort descending Modifiers Type Description Overrides
FileCount::access public function
FileCount::render public function
StatisticsBase::preRender public function Prefetch statistics for all jobs.