ILIAS  trunk Revision v11.0_alpha-1731-gff9cd7e2bd3
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
DataFetcher.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 
25 
26 trait DataFetcher
27 {
28  public function dataValue(
29  ElementInterface $element,
30  bool $ignore_marker
31  ): string {
32  if (
33  !$ignore_marker &&
34  ($element instanceof MarkableInterface) &&
35  $element->isMarked()
36  ) {
37  return $element->getMarker()->dataValue();
38  }
39  return $element->getData()->value();
40  }
41 }
isMarked()
Elements can be marked to be created, updated or deleted.