You are here

public function ScheduledPublish::isEmpty in Scheduled Publish 8

Same name and namespace in other branches
  1. 8.3 src/Plugin/Field/FieldType/ScheduledPublish.php \Drupal\scheduled_publish\Plugin\Field\FieldType\ScheduledPublish::isEmpty()
  2. 8.2 src/Plugin/Field/FieldType/ScheduledPublish.php \Drupal\scheduled_publish\Plugin\Field\FieldType\ScheduledPublish::isEmpty()

Determines whether the data structure is empty.

Return value

bool TRUE if the data structure is empty, FALSE otherwise.

Overrides DateTimeItem::isEmpty

File

src/Plugin/Field/FieldType/ScheduledPublish.php, line 65

Class

ScheduledPublish
Plugin implementation of the 'scheduled_publish_type' field type.

Namespace

Drupal\scheduled_publish\Plugin\Field\FieldType

Code

public function isEmpty() {
  return empty($this
    ->get('moderation_state')
    ->getValue()) || empty($this
    ->get('value')
    ->getValue());
}