Loading office_hours.libraries.yml +1 −1 Original line number Diff line number Diff line Loading @@ -12,5 +12,5 @@ office_hours_widget: js: js/office_hours.js: {} dependencies: - core/jquery - core/drupal - core/jquery src/OfficeHoursFormatterTrait.php +0 −1 Original line number Diff line number Diff line Loading @@ -4,7 +4,6 @@ namespace Drupal\office_hours; use Drupal\Component\Utility\Html; use Drupal\office_hours\Element\OfficeHoursDatetime; use Drupal\office_hours\OfficeHoursDateHelper; /** * Factors out OfficeHoursItemList->getItems()->getRows(). Loading src/Plugin/Field/FieldType/OfficeHoursItem.php +1 −0 Original line number Diff line number Diff line Loading @@ -113,6 +113,7 @@ class OfficeHoursItem extends FieldItemBase { * * @param array $settings * The field settings. * * @return array * The form definition for the field settings. */ Loading src/Plugin/Field/FieldWidget/OfficeHoursWidgetBase.php +6 −5 Original line number Diff line number Diff line Loading @@ -33,9 +33,9 @@ abstract class OfficeHoursWidgetBase extends WidgetBase { return $element; } public function extractFormValues(FieldItemListInterface $items, array $form, FormStateInterface $form_state) { parent::extractFormValues($items, $form, $form_state); } // public function extractFormValues(FieldItemListInterface $items, array $form, FormStateInterface $form_state) { // parent::extractFormValues($items, $form, $form_state); // } /** * {@inheritdoc} Loading Loading @@ -66,7 +66,8 @@ abstract class OfficeHoursWidgetBase extends WidgetBase { // Perhaps, but using '-1' (saved as '-001') works, too. $item['starthours'] = !empty($start) ? (int) $start : -1; $item['endhours'] = !empty($end) ? (int) $end : -1; } else { } else { $item['starthours'] = isset($start) ? (int) $start : -1; $item['endhours'] = isset($end) ? (int) $end : -1; } Loading src/Plugin/migrate/process/CSVOfficeHoursField.php +0 −1 Original line number Diff line number Diff line Loading @@ -133,7 +133,6 @@ class CSVOfficeHoursField extends OfficeHoursField { // Override empty values because it is not well handled if there // is a comment associated with a day. But if there is no comment // it has to be empty. if ($item['comment']) { $item['starthours'] = empty($item['starthours']) ? -1 : $item['starthours']; $item['endhours'] = empty($item['endhours']) ? -1 : $item['endhours']; Loading Loading
office_hours.libraries.yml +1 −1 Original line number Diff line number Diff line Loading @@ -12,5 +12,5 @@ office_hours_widget: js: js/office_hours.js: {} dependencies: - core/jquery - core/drupal - core/jquery
src/OfficeHoursFormatterTrait.php +0 −1 Original line number Diff line number Diff line Loading @@ -4,7 +4,6 @@ namespace Drupal\office_hours; use Drupal\Component\Utility\Html; use Drupal\office_hours\Element\OfficeHoursDatetime; use Drupal\office_hours\OfficeHoursDateHelper; /** * Factors out OfficeHoursItemList->getItems()->getRows(). Loading
src/Plugin/Field/FieldType/OfficeHoursItem.php +1 −0 Original line number Diff line number Diff line Loading @@ -113,6 +113,7 @@ class OfficeHoursItem extends FieldItemBase { * * @param array $settings * The field settings. * * @return array * The form definition for the field settings. */ Loading
src/Plugin/Field/FieldWidget/OfficeHoursWidgetBase.php +6 −5 Original line number Diff line number Diff line Loading @@ -33,9 +33,9 @@ abstract class OfficeHoursWidgetBase extends WidgetBase { return $element; } public function extractFormValues(FieldItemListInterface $items, array $form, FormStateInterface $form_state) { parent::extractFormValues($items, $form, $form_state); } // public function extractFormValues(FieldItemListInterface $items, array $form, FormStateInterface $form_state) { // parent::extractFormValues($items, $form, $form_state); // } /** * {@inheritdoc} Loading Loading @@ -66,7 +66,8 @@ abstract class OfficeHoursWidgetBase extends WidgetBase { // Perhaps, but using '-1' (saved as '-001') works, too. $item['starthours'] = !empty($start) ? (int) $start : -1; $item['endhours'] = !empty($end) ? (int) $end : -1; } else { } else { $item['starthours'] = isset($start) ? (int) $start : -1; $item['endhours'] = isset($end) ? (int) $end : -1; } Loading
src/Plugin/migrate/process/CSVOfficeHoursField.php +0 −1 Original line number Diff line number Diff line Loading @@ -133,7 +133,6 @@ class CSVOfficeHoursField extends OfficeHoursField { // Override empty values because it is not well handled if there // is a comment associated with a day. But if there is no comment // it has to be empty. if ($item['comment']) { $item['starthours'] = empty($item['starthours']) ? -1 : $item['starthours']; $item['endhours'] = empty($item['endhours']) ? -1 : $item['endhours']; Loading