IsStub.php in Multiversion 8.2
File
src/IsStub.php
View source
<?php
namespace Drupal\multiversion;
use Drupal\Core\TypedData\TypedData;
class IsStub extends TypedData {
public function getValue($langcode = NULL) {
if (isset($this->value) && $this->value !== NULL) {
return $this->value;
}
$entity = $this
->getRoot()
->getValue();
if (!$entity
->isNew() && $entity->_rev->value == '0-00000000000000000000000000000000') {
return TRUE;
}
return FALSE;
}
}
Classes
Name |
Description |
IsStub |
The 'is_stub' property for revision token fields. |