You are here

public static function ConfigHandler::getDateEntryElements in Node expire 7.2

Gets condition for date entry elements.

This depends on value of variable node_expire_date_entry_elements and also is date_popup module of date module installed or not.

Return value

int 0 - use text fields 1 - use date popups

2 calls to ConfigHandler::getDateEntryElements()
AdminHookHandler::hookAdminSettings in src/Module/Hook/AdminHookHandler.php
Administrative settings.
FormHookHandler::doFormAlter in src/Module/Hook/FormHookHandler.php
Implements hook_form_alter().

File

src/Module/Config/ConfigHandler.php, line 48
ConfigHandler class.

Class

ConfigHandler
ConfigHandler class.

Namespace

Drupal\node_expire\Module\Config

Code

public static function getDateEntryElements() {

  // No date_popup module.
  if (!module_exists('date_popup')) {
    return 0;
  }

  // Legacy mode.
  if (variable_get('node_expire_handle_content_expiry', 2) == 0) {
    return 0;
  }
  return variable_get('node_expire_date_entry_elements', 0);
}