function access($op, $item) { $access = parent::access($op, $item); if ($op == 'add' && $access && empty($this->base_types)) { // Make sure there are base styles defined. $access = FALSE; } return $access; }
function access($op, $item) { $access = parent::access($op, $item); if ($op == 'add' & $access && empty($this->base_types)) { // Make sure there are base styles defined. $access = FALSE; // Give a warning about the missing base styles. drupal_set_message($this->plugin['strings']['message']['missing base type'], 'warning'); } return $access; }