() or hook_block_view_MODULE_DELTA_alter(). drupal_alter(array('block_view', "block_view_{$block->module}_{$delta}"), $array, $block); if (isset($cid)) { cache_set($cid, $array, 'cache_block', CACHE_TEMPORARY); } } if (isset($array) && is_array($array)) { foreach ($array as $k => $v) { $block->$k = $v; } } if (isset($block->content) && $block->content) { // Normalize to the drupal_render() structure. if (is_string($block->content)) { $block->content = array('#markup' => $block->content); } // Override default block title if a custom display title is present. if ($block->title) { // Check plain here to allow module generated titles to keep any // markup. $block->subject = $block->title == '' ? '' : check_plain($block->title); } if (!isset($block->subject)) { $block->subject = ''; } $region_blocks["{$block->module}_{$block->delta}"] = $block; } } } return $region_blocks; } /** * Assemble the cache_id to use for a given block. * * The cache_id string reflects the viewing context for the current block * instance, obtained by concatenating the relevant context information * (user, page, ...) according to the block's cache settings (BLOCK_CACHE_* * constants). Two block instances can use the same cached content when * they share the same cache_id. * * Theme and language contexts are automatically differentiated. * * @param $block * The block to get the cache_id from. * * @return * The string used as cache_id for the block. */ function _block_get_cache_id($block) { global $user; // User 1 being out of the regular 'roles define permissions' schema, // it brings too many chances of having unwanted output get in the cache // and later be served to other users. We therefore exclude user 1 from // block caching. if (variable_get('block_cache', FALSE) && !in_array($block->cache, array(DRUPAL_NO_CACHE, DRUPAL_CACHE_CUSTOM)) && $user->uid != 1) { // Start with common sub-patterns: block identification, theme, language. $cid_parts[] = $block->module; $cid_parts[] = $block->delta; drupal_alter('block_cid_parts', $cid_parts, $block); $cid_parts = array_merge($cid_parts, drupal_render_cid_parts($block->cache)); return implode(':', $cid_parts); } } /** * Implements hook_flush_caches(). */ function block_flush_caches() { // Rehash blocks for active themes. We don't use list_themes() here, // because if MAINTENANCE_MODE is defined it skips reading the database, // and we can't tell which themes are active. $themes = db_query("SELECT name FROM {system} WHERE type = 'theme' AND status = 1"); foreach ($themes as $theme) { _block_rehash($theme->name); } return array('cache_block'); } /** * Processes variables for block.tpl.php. * * Prepares the values passed to the theme_block function to be passed * into a pluggable template engine. Uses block properties to generate a * series of template file suggestions. If none are found, the default * block.tpl.php is used. * * Most themes utilize their own copy of block.tpl.php. The default is located * inside "modules/block/block.tpl.php". Look in there for the full list of * variables. * * The $variables array contains the following arguments: * - $block * * @see block.tpl.php */ function template_preprocess_block(&$variables) { $block_counter = &drupal_static(__FUNCTION__, array()); $variables['block'] = $variables['elements']['#block']; // All blocks get an independent counter for each region. if (!isset($block_counter[$variables['block']->region])) { $block_counter[$variables['block']->region] = 1; } // Same with zebra striping. $variables['block_zebra'] = ($block_counter[$variables['block']->region] % 2) ? 'odd' : 'even'; $variables['block_id'] = $block_counter[$variables['block']->region]++; // Create the $content variable that templates expect. $variables['content'] = $variables['elements']['#children']; $variables['classes_array'][] = drupal_html_class('block-' . $variables['block']->module); $variables['theme_hook_suggestions'][] = 'block__' . $variables['block']->region; $variables['theme_hook_suggestions'][] = 'block__' . $variables['block']->module; // Hyphens (-) and underscores (_) play a special role in theme suggestions. // Theme suggestions should only contain underscores, because within // drupal_find_theme_templates(), underscores are converted to hyphens to // match template file names, and then converted back to underscores to match // pre-processing and other function names. So if your theme suggestion // contains a hyphen, it will end up as an underscore after this conversion, // and your function names won't be recognized. So, we need to convert // hyphens to underscores in block deltas for the theme suggestions. $variables['theme_hook_suggestions'][] = 'block__' . $variables['block']->module . '__' . strtr($variables['block']->delta, '-', '_'); // Create a valid HTML ID and make sure it is unique. $variables['block_html_id'] = drupal_html_id('block-' . $variables['block']->module . '-' . $variables['block']->delta); } /** * Implements hook_user_role_delete(). * * Removes deleted role from blocks that use it. */ function block_user_role_delete($role) { db_delete('block_role') ->condition('rid', $role->rid) ->execute(); } /** * Implements hook_menu_delete(). */ function block_menu_delete($menu) { db_delete('block') ->condition('module', 'menu') ->condition('delta', $menu['menu_name']) ->execute(); db_delete('block_role') ->condition('module', 'menu') ->condition('delta', $menu['menu_name']) ->execute(); } /** * Implements hook_form_FORM_ID_alter(). */ function block_form_system_performance_settings_alter(&$form, &$form_state) { $disabled = (!variable_get('block_cache_bypass_node_grants', FALSE) && count(module_implements('node_grants'))); $form['caching']['block_cache'] = array( '#type' => 'checkbox', '#title' => t('Cache blocks'), '#default_value' => variable_get('block_cache', FALSE), '#disabled' => $disabled, '#description' => $disabled ? t('Block caching is inactive because you have enabled modules defining content access restrictions.') : NULL, '#weight' => -1, ); } /** * Implements hook_admin_paths(). */ function block_admin_paths() { $paths = array( // Exclude the block demonstration page from admin (overlay) treatment. // This allows us to present this page in its true form, full page. 'admin/structure/block/demo/*' => FALSE, ); return $paths; } /** * Implements hook_modules_uninstalled(). * * Cleans up {block} and {block_role} tables from modules' blocks. */ function block_modules_uninstalled($modules) { db_delete('block') ->condition('module', $modules, 'IN') ->execute(); db_delete('block_role') ->condition('module', $modules, 'IN') ->execute(); } Regnier Railroad 1610P | Салон-Магазин Eurotime(ЄвроТайм)
Увага! Ціни та наявність товару уточнюйте за телефоном +38(097) 793-18-33 (VIBER)

 

Regnier Railroad 1610P
    Regnier Railroad 1610P
  • Корпус:
  • Стекло:
  • Браслет:
  • Механизм:
  • Функции:
  • Водозащита: