function StylePluginBase::usesFields

Same name in other branches
  1. 9 core/modules/views/src/Plugin/views/style/StylePluginBase.php \Drupal\views\Plugin\views\style\StylePluginBase::usesFields()
  2. 8.9.x core/modules/views/src/Plugin/views/style/StylePluginBase.php \Drupal\views\Plugin\views\style\StylePluginBase::usesFields()
  3. 11.x core/modules/views/src/Plugin/views/style/StylePluginBase.php \Drupal\views\Plugin\views\style\StylePluginBase::usesFields()

Return TRUE if this style also uses fields.

Return value

bool

5 calls to StylePluginBase::usesFields()
Grid::buildOptionsForm in core/modules/views/src/Plugin/views/style/Grid.php
Provide a form to edit options for this plugin.
Grid::getCustomClass in core/modules/views/src/Plugin/views/style/Grid.php
Return the token-replaced row or column classes for the specified result.
StylePluginBase::buildOptionsForm in core/modules/views/src/Plugin/views/style/StylePluginBase.php
Provide a form to edit options for this plugin.
StylePluginBase::getRowClass in core/modules/views/src/Plugin/views/style/StylePluginBase.php
Return the token replaced row class for the specified row.
StylePluginBase::renderFields in core/modules/views/src/Plugin/views/style/StylePluginBase.php
Renders all of the fields for a given style and store them on the object.

File

core/modules/views/src/Plugin/views/style/StylePluginBase.php, line 184

Class

StylePluginBase
Base class for views style plugins.

Namespace

Drupal\views\Plugin\views\style

Code

public function usesFields() {
    // If we use a row plugin, ask the row plugin. Chances are, we don't
    // care, it does.
    $row_uses_fields = FALSE;
    if ($this->usesRowPlugin() && ($row_plugin = $this->displayHandler
        ->getPlugin('row'))) {
        $row_uses_fields = $row_plugin->usesFields();
    }
    // Otherwise, check the definition or the option.
    return $row_uses_fields || $this->usesFields || !empty($this->options['uses_fields']);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.