11 * Provide the summary information for the block settings vertical tabs.
13 * @type {Drupal~behavior}
15 * @prop {Drupal~behaviorAttach} attach
16 * Attaches the behavior for the block settings summaries.
18 Drupal.behaviors.phpSettingsSummary = {
20 // The drupalSetSummary method required for this behavior is not available
21 // on the Blocks administration page, so we need to make sure this
22 // behavior is processed only if drupalSetSummary is defined.
23 if (typeof jQuery.fn.drupalSetSummary === 'undefined') {
27 $('[data-drupal-selector="edit-visibility-php"]').drupalSetSummary(function (context) {
28 var $code = $(context).find('textarea[name="visibility[php][php]"]');
29 if ($code.val() === '<?php return TRUE; ?>') {
30 return Drupal.t('Not restricted');
33 return Drupal.t('Restricted to certain pages');