You are here

public function QuickCallbackContent::__construct in Quick Tabs 7.3

Constructor

Overrides QuickContent::__construct

File

plugins/QuickCallbackContent.inc, line 13

Class

QuickCallbackContent
Class for tab content of type "callback" - this is for rendering the contents of some menu callback function as tab content.

Code

public function __construct($item) {
  parent::__construct($item);
  if (isset($item['path'])) {
    $url_args = arg();
    $path = $item['path'];
    foreach ($url_args as $id => $arg) {
      $path = str_replace("%{$id}", $arg, $path);
    }
    $path = preg_replace(',/?(%\\d),', '', $path);
    if (!empty($path)) {
      $this->settings['ajax_path'] = rawurlencode($path);
    }
    else {
      $this->settings['ajax_path'] = '';
    }
    $this->settings['actual_path'] = $path;
  }
}