function EntityView::accessRecursion

File

src/Plugin/Block/EntityView.php, line 107

Class

EntityView
Provides a block to view a specific entity.

Namespace

Drupal\ctools\Plugin\Block

Code

protected function accessRecursion(EntityInterface $entity, array $config) {
    if (!isset(self::$recusion[$entity->uuid()][$config['view_mode']])) {
        self::$recusion[$entity->uuid()][$config['view_mode']] = 0;
    }
    return self::$recusion[$entity->uuid()][$config['view_mode']]++;
}