Ejemplo n.º 1
0
 public function __construct($config = array())
 {
     parent::__construct($config);
     $this->setScriptPath(realpath(APPLICATION_PATH . '/../public') . '/skins/commons/invoices/');
     $this->assign('translator', Shineisp_Registry::getInstance()->Zend_Translate);
     require_once PROJECT_PATH . '/library/html2pdf/html2pdf.class.php';
 }
Ejemplo n.º 2
0
Archivo: View.php Proyecto: jo-m/ecamp3
 /**
  * Constructor.
  *
  * @param array $options Configuration options.
  */
 public function __construct($options = array())
 {
     parent::__construct($options);
     $this->setEngine(new PHPTAL());
     // configure the encoding
     if (isset($options['encoding']) && $options['encoding'] != '') {
         $this->setEncoding((string) $options['encoding']);
     } else {
         $this->setEncoding('UTF-8');
     }
     // change the compiled code destination if set in the config
     if (isset($options['cacheDirectory']) && $options['cacheDirectory'] != '') {
         $this->setCacheDirectory((string) $options['cacheDirectory']);
     }
     // configure the caching mode
     if (isset($options['cachePurgeMode'])) {
         $this->setCachePurgeMode($options['cachePurgeMode'] == '1');
     }
     // configure the whitespace compression mode
     if (isset($options['compressWhitespace'])) {
         $this->setCompressWhitespace($options['compressWhitespace'] == '1');
     }
     // configure the title separator
     if (isset($options['titleSeparator'])) {
         $this->headTitle()->setSeparator($options['titleSeparator']);
     }
     // configure the title
     if (isset($options['title'])) {
         $this->headTitle($options['title']);
     }
     // set the layout template path
     $this->addTemplateRepositoryPath(Zend_Layout::getMvcInstance()->getLayoutPath());
     // Set the remaining template repository directories;
     if (isset($options['globalTemplatesDirectory'])) {
         $directories = $options['globalTemplatesDirectory'];
         if (!is_array($directories)) {
             $directories = array($directories);
         }
         foreach ($directories as $currentDirectory) {
             $this->addTemplateRepositoryPath($currentDirectory);
         }
     }
     $ztalBasePath = realpath(dirname(__FILE__) . DIRECTORY_SEPARATOR . '..');
     // Add ZTal's macro repository as a final default.
     $ztalMacroPath = $ztalBasePath . DIRECTORY_SEPARATOR . 'Macros';
     $this->addTemplateRepositoryPath($ztalMacroPath);
     //load in all php files that exist in the custom modifiers directory
     if (isset($options['customModifiersDirectory'])) {
         $customModifiers = $options['customModifiersDirectory'];
         if (!is_array($customModifiers)) {
             $customModifiers = array($customModifiers);
         }
         foreach ($customModifiers as $currentPath) {
             $this->addCustomModifiersPath($currentPath);
         }
     }
     // Add ZTal's tales repository as a final default.
     $ztalTalesPath = $ztalBasePath . DIRECTORY_SEPARATOR . 'Tales';
     $this->addCustomModifiersPath($ztalTalesPath);
 }
Ejemplo n.º 3
0
 public function __construct($config = array())
 {
     parent::__construct($config = array());
     // add the path to the scripts
     $this->setScriptPath(APPLICATION_PATH . "/views/scripts/email/");
     $this->appname = getAppName();
     $config = Zend_Registry::get("config");
     // default sign off name and email
     $mail = Zend_Registry::get('mail');
     $default_sender = $mail->getDefaultFrom();
     //$this->signoffname = $default_sender['name'];
     //$this->signoffemail = $default_sender['email'];
     $this->signoffname = getDefaultAdminName();
     $this->signoffemail = getDefaultAdminEmail();
     $this->contactusurl = $this->serverUrl($this->baseUrl('contactus'));
     $this->logourl = $this->serverUrl($this->baseUrl('images/logo.jpg'));
     $this->loginurl = $this->serverUrl($this->baseUrl('user/login'));
     $this->baseurl = $this->serverUrl($this->baseUrl());
     $this->settingsurl = $this->serverUrl($this->baseUrl('profile/view/tab/account'));
     $allcolors = getAllThemeColors();
     //debugMessage($allcolors);
     $colortxt = getThemeColor();
     $themecolor = "blue";
     if (!isEmptyString($colortxt)) {
         $themecolor = $colortxt;
     }
     $this->themecolor = $allcolors[$themecolor];
     // debugMessage('color is '.$allcolors[$themecolor]);
 }
Ejemplo n.º 4
0
 public function __construct($config = array())
 {
     // Set the default script views if not supplied by user
     if (!array_key_exists('scriptPath', $config)) {
         $config['scriptPath'] = realpath(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'View');
     }
     parent::__construct($config);
 }
Ejemplo n.º 5
0
 public function __construct($config = array())
 {
     if (array_key_exists('basePath', $config) === false) {
         $basePath = APPLICATION_PATH . '/views/';
         $config['basePath'] = $basePath;
     }
     parent::__construct($config);
 }
Ejemplo n.º 6
0
 /**
  * Constructor.
  *
  * @param array $options Configuration options.
  */
 public function __construct($options = array())
 {
     parent::__construct($options);
     $this->_preFiltersRegistered = false;
     if (isset($options['engineClass']) && $options['engineClass'] != '' && class_exists($options['engineClass']) && is_subclass_of($options['engineClass'], 'PHPTAL')) {
         $talClass = $options['engineClass'];
     } else {
         $talClass = '\\PHPTAL';
     }
     $this->setEngine(new $talClass());
     // configure the encoding
     if (isset($options['encoding']) && $options['encoding'] != '') {
         $this->setEncoding((string) $options['encoding']);
     } else {
         $this->setEncoding('UTF-8');
     }
     // change the compiled code destination if set in the config
     if (isset($options['cacheDirectory']) && $options['cacheDirectory'] != '') {
         $this->setCacheDirectory((string) $options['cacheDirectory']);
     }
     // configure the caching mode
     if (isset($options['cachePurgeMode'])) {
         $this->setCachePurgeMode($options['cachePurgeMode'] == '1');
     }
     // configure the whitespace compression mode
     if (isset($options['compressWhitespace'])) {
         $this->setCompressWhitespace($options['compressWhitespace'] == '1');
     }
     // Stack up the script paths. Zend's setScriptPath call is lifo
     // so we start with the bottom item first.
     // First set the path for Ztal's own macros
     $ztalBasePath = realpath(__DIR__ . DIRECTORY_SEPARATOR . '..');
     $this->setScriptPath($ztalBasePath . DIRECTORY_SEPARATOR . 'Macros');
     // Now setup the directories specified in the Ztal config
     if (isset($options['globalTemplatesDirectory'])) {
         $directories = $options['globalTemplatesDirectory'];
         if (!is_array($directories)) {
             $directories = array($directories);
         }
         foreach ($directories as $currentDirectory) {
             $this->addScriptPath($currentDirectory);
         }
     }
     // Next setup the custom modifiers
     //load in all php files that exist in the custom modifiers directory
     if (isset($options['customModifiersDirectory'])) {
         $customModifiers = $options['customModifiersDirectory'];
         if (!is_array($customModifiers)) {
             $customModifiers = array($customModifiers);
         }
         foreach ($customModifiers as $currentPath) {
             $this->addCustomModifiersPath($currentPath);
         }
     }
     // Add ZTal's tales repository as a final default.
     $ztalTalesPath = $ztalBasePath . DIRECTORY_SEPARATOR . 'Tales';
     $this->addCustomModifiersPath($ztalTalesPath);
 }
Ejemplo n.º 7
0
 /**
  * Constructor
  */
 public function __construct($config = array(), $translate = null)
 {
     parent::__construct($config);
     $this->_translate = $translate;
     $this->_placeholderRegistry = Zend_View_Helper_Placeholder_Registry::getRegistry();
     if (array_key_exists('use_module_cache', $config) && (bool) $config['use_module_cache']) {
         $this->_moduleCache = OntoWiki::getInstance()->getCache();
     }
 }
Ejemplo n.º 8
0
 function __construct($recipient, $recipientName, $subject, $template)
 {
     parent::__construct();
     $this->template = $template;
     $this->recipient = $recipient;
     $this->recipientName = $recipientName;
     $this->subject = $subject;
     $config = Zend_Registry::get('config');
     $this->url = $config['url'];
     $this->addScriptPath(APPLICATION_PATH . '/views/mails/');
 }
Ejemplo n.º 9
0
	public function __construct($options)
    {
		parent::__construct( $options );
    }
Ejemplo n.º 10
0
 /**
  * Constructor.
  *
  * @param array $config Configuration key-value pairs.
  * @return void
  */
 public function __construct($config = array())
 {
     parent::__construct($config);
 }
Ejemplo n.º 11
0
 public function __construct()
 {
     $this->root_sprocket = new Sprocket();
     parent::__construct();
 }
Ejemplo n.º 12
0
 /**
  * Constructs new object using template name and auto render params
  *
  * @param string $template
  * @param int $auto 
  */
 function __construct($template = '', $auto = FALSE)
 {
     parent::__construct();
     $this->addHelperPath('Uni/Core/View/Helper', 'Uni_View_Helper');
     $this->viewBase = APPLICATION_PATH . DS . 'views' . DS . Fox::getMode() . DS;
     $this->defaultScriptPath = $this->viewBase . 'core' . DS . 'default' . DS . 'template';
     $this->auto = $auto;
     if ($template != '') {
         $this->setTemplate($template);
     }
 }