Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. FieldPluginBase.php

function FieldPluginBase::isValueEmpty

Overrides FieldHandlerInterface::isValueEmpty

2 calls to FieldPluginBase::isValueEmpty()
FieldPluginBase::advancedRender in core/modules/views/src/Plugin/views/field/FieldPluginBase.php
Renders a field using advanced settings.
FieldPluginBase::renderText in core/modules/views/src/Plugin/views/field/FieldPluginBase.php
Performs an advanced text render for the item.

File

core/modules/views/src/Plugin/views/field/FieldPluginBase.php, line 1264

Class

FieldPluginBase
Base class for views fields.

Namespace

Drupal\views\Plugin\views\field

Code

public function isValueEmpty($value, $empty_zero, $no_skip_empty = TRUE) {
    // Convert MarkupInterface to a string for checking.
    if ($value instanceof MarkupInterface) {
        $value = (string) $value;
    }
    if (!isset($value)) {
        $empty = TRUE;
    }
    else {
        $empty = $empty_zero || $value !== 0 && $value !== '0';
    }
    if ($no_skip_empty) {
        $empty = empty($value) && $empty;
    }
    return $empty;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal