protected function EditUpdateForm::getScheduledFields in Scheduled Publish 8.3
Returns scheduled publish fields
Parameters
string $entityTypeName:
string $bundleName:
Return value
array
1 call to EditUpdateForm::getScheduledFields()
- EditUpdateForm::buildForm in src/
Form/ EditUpdateForm.php - Form constructor.
File
- src/
Form/ EditUpdateForm.php, line 132 - Contains \Drupal\scheduled_publish\Form\EditUpdateForm.
Class
Namespace
Drupal\scheduled_publish\FormCode
protected function getScheduledFields(string $entityTypeName, string $bundleName) : array {
$scheduledFields = [];
$fields = \Drupal::service('entity_field.manager')
->getFieldDefinitions($entityTypeName, $bundleName);
foreach ($fields as $fieldName => $field) {
/** @var FieldConfig $field */
if (strpos($fieldName, 'field_') !== FALSE) {
if ($field
->getType() === 'scheduled_publish') {
$scheduledFields[] = $fieldName;
}
}
}
return $scheduledFields;
}