RealisticDummyContentTextWithSummaryField.php in Realistic Dummy Content 8.2
File
api/src/includes/RealisticDummyContentTextWithSummaryField.php
View source
<?php
namespace Drupal\realistic_dummy_content_api\includes;
use Drupal\realistic_dummy_content_api\Framework\Framework;
class RealisticDummyContentTextWithSummaryField extends RealisticDummyContentField {
public function implementValueFromFile($file) {
$value = $file
->Value();
$format = $file
->Attribute('format', Framework::instance()
->filteredHtml());
if ($value === NULL) {
return NULL;
}
if ($value) {
$return = Framework::instance()
->formatProperty('text_with_summary', $value, array(
'format' => $format,
));
return $return;
}
else {
return array();
}
}
}