You are here

function scheduled_publish_is_node_edit_form in Scheduled Publish 8

1 call to scheduled_publish_is_node_edit_form()
scheduled_publish_form_alter in ./scheduled_publish.module
Implements hook_form_alter

File

./scheduled_publish.module, line 28
Contains scheduled_publish.module.

Code

function scheduled_publish_is_node_edit_form() : bool {
  $currentPath = \Drupal::service('path.current')
    ->getPath();
  if (is_numeric(strpos($currentPath, '/node/')) && (is_numeric(strpos($currentPath, '/edit')) || is_numeric(strpos($currentPath, '/add')))) {
    return TRUE;
  }
  return FALSE;
}