Example #1
0
 protected function setUp()
 {
     $this->_picker = new Zle_Form_Element_DatePicker('foo');
     $this->_view = new Zend_View();
     $this->_view->addHelperPath(realpath(dirname(__FILE__) . '/../../../../library/Zle/View/Helper'), 'Zle_View_Helper');
     ZendX_JQuery::enableView($this->_view);
 }
Example #2
0
 public function _initView()
 {
     // Initialize view
     $view = new Zend_View();
     // Setup Helper Paths
     $view->setHelperPath(SM_LIB . DIRECTORY_SEPARATOR . 'View' . DIRECTORY_SEPARATOR . 'Helper', 'Smallunch_lib_View_Helper');
     // Add Global Helper path (typically application/helpers
     $view->addHelperPath(GLOBAL_HELPER_DIR . DIRECTORY_SEPARATOR . 'View');
     // add per application helper path (typically application/(backend, frontend)/helpers
     $view->addHelperPath(APPLICATION_DIRECTORY . DIRECTORY_SEPARATOR . 'Helper' . DIRECTORY_SEPARATOR . 'View');
     // Setup layout
     if (isset($this->config->layout->doctype)) {
         $view->doctype($this->config->layout->doctype);
     }
     if (isset($this->config->default->title)) {
         $view->headTitle($this->config->default->title);
     }
     if (isset($this->config->default->meta_keywords)) {
         $view->headMeta($this->config->default->meta_keywords, 'keywords');
     }
     if (isset($this->config->default->meta_description)) {
         $view->headMeta($this->config->default->meta_description, 'description');
     }
     if (isset($this->config->layout->charset)) {
         $view->headMeta()->appendHttpEquiv('Content-Type', 'text/html; charset=' . $this->config->layout->charset);
     }
     if (isset($this->config->layout->content_language)) {
         $view->headMeta()->appendHttpEquiv('Content-Language', $this->config->layout->content_language);
     }
     // Add it to the ViewRenderer
     $viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('ViewRenderer');
     $viewRenderer->setView($view);
     // Return it, so that it can be stored by the bootstrap
     return $view;
 }
Example #3
0
 protected function _initView()
 {
     $view = new Zend_View();
     $view->doctype('XHTML1_STRICT');
     $view->headTitle('Truffes');
     $view->headLink()->appendStylesheet('/css/main.css');
     $view->addHelperPath(APPLICATION_PATH . '/helpers', 'View_Helper');
     $view->addHelperPath(APPLICATION_PATH . '/modules/frontend/views/helpers', 'View_Helper');
     $viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('ViewRenderer');
     $viewRenderer->setView($view);
     return $view;
 }
Example #4
0
 protected function _initHelper()
 {
     $lib_path = APPLICATION_PATH . "/lib";
     $view = new Zend_View();
     $view->addHelperPath("Cible/View/Helper", "Cible_View_Helper");
     $view->addHelperPath("ZendX/JQuery/View/Helper", "ZendX_JQuery_View_Helper");
     $view->addBasePath("{$lib_path}/Cible/View");
     $view->addBasePath("{$lib_path}/ZendX/JQuery/View");
     $view->addBasePath("{$lib_path}/Cible/Validate");
     $viewRenderer = new Zend_Controller_Action_Helper_ViewRenderer();
     $viewRenderer->setView($view);
     Zend_Controller_Action_HelperBroker::addHelper($viewRenderer);
 }
Example #5
0
 protected function _initView()
 {
     $view = new Zend_View();
     $view->doctype('XHTML1_TRANSITIONAL');
     $view->headMeta()->appendHttpEquiv('Content-type', 'text/html;charset=utf-8');
     $view->headTitle('· Intermodels · Un deseo...hecho realidad · Modelos · Gogós · Azafatas · Agencia · Barcelona ·')->setSeparator(' - ');
     $view->headScript()->prependFile('http://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js');
     $view->addHelperPath('Neo/View/Helper', 'Neo_View_Helper');
     $view->addHelperPath('ZendX/JQuery/View/Helper/', 'ZendX_JQuery_View_Helper');
     $viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('ViewRenderer');
     $viewRenderer->setView($view);
     return $view;
 }
Example #6
0
 protected function _initView()
 {
     $path = APPLICATION_PATH . '/modules/' . MODULE_NAME . '/views';
     $view = new Zend_View();
     $view->setUseStreamWrapper(true);
     $view->setEncoding('UTF-8');
     $view->addScriptPath($path . '/partials');
     $view->addScriptPath($path . '/scripts');
     $view->addHelperPath(APPLICATION_PATH . '/../library/Bbx/View/Helper', 'Bbx_View_Helper');
     $view->addHelperPath($path . '/helpers', 'ViewHelper');
     $viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('ViewRenderer');
     $viewRenderer->setView($view);
     Zend_Registry::set('view', $view);
 }
Example #7
0
 /**
  * Get view
  * 
  * @return Zend_View 
  */
 protected function getView()
 {
     if (!isset(self::$renderView)) {
         //init view
         self::$renderView = new Zend_View();
         self::$renderView->setScriptPath(APPLICATION_PATH . "/modules/teaser/views/scripts/templates/");
         self::$renderView->addHelperPath(APPLICATION_PATH . "/modules/teaser/views/helpers/", "Teaser_View_Helper");
         $mvcView = Zend_Layout::getMvcInstance()->getView();
         if (isset($mvcView->theme)) {
             self::$renderView->addScriptPath(APPLICATION_PATH . '/../themes/' . $mvcView->theme . '/views/teaser/templates/');
         }
     }
     return self::$renderView;
 }
 protected function _initViewHelpers()
 {
     $view = new Zend_View();
     $view->addHelperPath("ZendX/JQuery/View/Helper", "ZendX_JQuery_View_Helper");
     $view->jQuery()->addStylesheet($view->baseUrl . '/js/jquery/css/ui-lightness/jquery-ui-1.8.13.custom.css');
     $view->jQuery()->setLocalPath($view->baseUrl . '/js/jquery/js/jquery-1.5.1.min.js');
     $view->jQuery()->setUiLocalPath($view->baseUrl . '/js/jquery/js/jquery-ui-1.8.13.custom.min.js');
     $view->jQuery()->enable();
     $view->jQuery()->uiEnable();
     $view->addHelperPath("ZendX/Core/ViewHelper/Html", "ZendX_Core_ViewHelper_Html");
     $viewRenderer = new Zend_Controller_Action_Helper_ViewRenderer();
     $viewRenderer->setView($view);
     Zend_Controller_Action_HelperBroker::addHelper($viewRenderer);
     return $view;
 }
Example #9
0
 /**
  * Send email notification to moderators when a new comment is posted
  * 
  * @todo move logic to model / library class
  * 
  * @param HumanHelp_Model_Comment $comment
  * @param HumanHelp_Model_Page $page
  */
 public function _sendNewCommentEmail(HumanHelp_Model_Comment $comment, HumanHelp_Model_Page $page)
 {
     $config = Zend_Registry::get('config');
     $emailTemplate = new Zend_View();
     $emailTemplate->setScriptPath(APPLICATION_PATH . '/views/emails');
     $emailTemplate->addHelperPath(APPLICATION_PATH . '/views/helpers', 'HumanHelp_View_Helper_');
     $emailTemplate->setEncoding('UTF-8');
     $emailTemplate->comment = $comment;
     $emailTemplate->page = $page;
     $emailTemplate->baseUrl = 'http://' . $_SERVER['HTTP_HOST'] . $this->view->baseUrl;
     $bodyHtml = $emailTemplate->render('newComment.phtml');
     $bodyText = $emailTemplate->render('newComment.ptxt');
     $mail = new Zend_Mail();
     $mail->setType(Zend_Mime::MULTIPART_ALTERNATIVE)->setBodyHtml($bodyHtml, 'UTF-8')->setBodyText($bodyText, 'UTF-8')->setSubject("New comment on '{$page->getTitle()}' in '{$page->getBook()->getTitle()}'")->setFrom($config->fromAddress, $config->fromName);
     if (is_object($config->notifyComments)) {
         foreach ($config->notifyComments->toArray() as $rcpt) {
             $mail->addTo($rcpt);
         }
     } else {
         $mail->addTo($config->notifyComments);
     }
     if ($config->smtpServer) {
         $transport = new Zend_Mail_Transport_Smtp($config->smtpServer, $config->smtpOptions->toArray());
     } else {
         $transport = new Zend_Mail_Transport_Sendmail();
     }
     $mail->send($transport);
 }
Example #10
0
 public function __construct($options, $seotoasterData)
 {
     // setting up Seotoaster data and plugin options
     $this->_options = $options;
     $this->_seotoasterData = $seotoasterData;
     // setting up helpers
     $this->_sessionHelper = Zend_Controller_Action_HelperBroker::getStaticHelper('session');
     $this->_websiteHelper = Zend_Controller_Action_HelperBroker::getStaticHelper('website');
     $this->_responseHelper = Zend_Controller_Action_HelperBroker::getStaticHelper('response');
     $this->_redirector = new Zend_Controller_Action_Helper_Redirector();
     // setting up request and response objects
     $front = Zend_Controller_Front::getInstance();
     $this->_request = $front->getRequest();
     $this->_response = $front->getResponse();
     unset($front);
     // setting up view
     $this->_view = new Zend_View();
     $this->_websiteUrl = $this->_websiteHelper->getUrl();
     $this->_pluginName = strtolower(__CLASS__);
     $this->_view->websiteUrl = $this->_websiteUrl;
     $this->_view->pluginName = $this->_pluginName;
     // setting up view helpers (standart and ZendX)
     $this->_view->setHelperPath(APPLICATION_PATH . '/views/helpers/');
     $this->_view->addHelperPath('ZendX/JQuery/View/Helper/', 'ZendX_JQuery_View_Helper');
     // runing init routines
     $this->_initAcl();
     $this->_initTranslator();
     $this->_init();
 }
Example #11
0
 /**
  * Fungsi untuk inisialisasi view
  */
 protected function _initView()
 {
     // Initialize view
     $view = new Zend_View();
     /* ZendX_JQuery::enableView($view);
     
               $view->addHelperPath('ZendX/JQuery/View/Helper',
               'ZendX_JQuery_View_Helper'); */
     $view->addHelperPath(APPLICATION_PATH . '/../library/Budpar/View/Helper/', 'Budpar_View_Helper');
     $view->addHelperPath(APPLICATION_PATH . '/views/helpers', 'View_Helper');
     // Add it to the ViewRenderer
     $viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('ViewRenderer');
     $viewRenderer->setView($view);
     // Return it, so that it can be stored by the bootstrap
     return $view;
 }
Example #12
0
 private function initView()
 {
     $view = new Zend_View();
     $view->addHelperPath(APPLICATION_PATH . '/../library/EasyCMS/View/Helper', 'EasyCMS_View_Helper');
     $viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('ViewRenderer');
     $viewRenderer->setView($view);
 }
 public function getView()
 {
     require_once 'Zend/View.php';
     $view = new Zend_View();
     $view->addHelperPath('ZendX/MooTools/View/Helper/', 'ZendX_MooTools_View_Helper');
     return $view;
 }
Example #14
0
 public function getView()
 {
     require_once 'Zend/View.php';
     $view = new Zend_View();
     $view->addHelperPath('Zend/Dojo/View/Helper/', 'Zend_Dojo_View_Helper');
     return $view;
 }
Example #15
0
 public function getView()
 {
     // require_once 'Zend/View.php';
     $view = new Zend_View(array('encoding' => 'UTF-8'));
     $view->addHelperPath(dirname(__FILE__) . '/../../../../library/Zend/View/Helper');
     return $view;
 }
Example #16
0
 public function getView()
 {
     $view = new Zend_View();
     $view->addHelperPath(dirname(__FILE__) . '/../../../../library/Zend/View/Helper');
     $view->addScriptPath(dirname(__FILE__) . '/../_files/views/');
     return $view;
 }
Example #17
0
 public function getView()
 {
     $view = new Zend_View();
     $libPath = dirname(__FILE__) . '/../../../library';
     $view->addHelperPath($libPath . '/Zend/View/Helper');
     return $view;
 }
Example #18
0
 public function getView()
 {
     require_once 'Zend/View.php';
     $view = new Zend_View();
     $view->addHelperPath(dirname(__FILE__) . '/../../../../library/Zend/View/Helper');
     return $view;
 }
Example #19
0
 protected function _initView()
 {
     $theme = 'default';
     $templatePath = APPLICATION_PATH . '/../public/themes/' . $theme . '/templates';
     Zend_Registry::set('user_date_format', 'm-d-Y');
     Zend_Registry::set('calendar_date_format', 'mm-dd-yy');
     Zend_Registry::set('db_date_format', 'Y-m-d');
     Zend_Registry::set('perpage', 10);
     Zend_Registry::set('menu', 'home');
     Zend_Registry::set('eventid', '');
     $dir_name = $_SERVER['DOCUMENT_ROOT'] . rtrim(str_replace(basename($_SERVER['SCRIPT_NAME']), '', $_SERVER['SCRIPT_NAME']), '/');
     Zend_Registry::set('acess_file_path', $dir_name . SEPARATOR . "application" . SEPARATOR . "modules" . SEPARATOR . "default" . SEPARATOR . "plugins" . SEPARATOR . "AccessControl.php");
     Zend_Registry::set('siteconstant_file_path', $dir_name . SEPARATOR . "public" . SEPARATOR . "site_constants.php");
     Zend_Registry::set('emailconstant_file_path', $dir_name . SEPARATOR . "public" . SEPARATOR . "email_constants.php");
     Zend_Registry::set('emptab_file_path', $dir_name . SEPARATOR . "public" . SEPARATOR . "emptabconfigure.php");
     Zend_Registry::set('emailconfig_file_path', $dir_name . SEPARATOR . "public" . SEPARATOR . "mail_settings_constants.php");
     Zend_Registry::set('application_file_path', $dir_name . SEPARATOR . "public" . SEPARATOR . "application_constants.php");
     $date = new Zend_Date();
     Zend_Registry::set('currentdate', $date->get('yyyy-MM-dd HH:mm:ss'));
     Zend_Registry::set('currenttime', $date->get('HH:mm:ss'));
     Zend_Registry::set('logo_url', '/public/images/landing_header.jpg');
     $view = new Zend_View();
     $view->setEscape('stripslashes');
     $view->setBasePath($templatePath);
     $view->setScriptPath(APPLICATION_PATH);
     $view->addHelperPath('ZendX/JQuery/View/Helper', 'ZendX_JQuery_View_Helper');
     $viewRenderer = new Zend_Controller_Action_Helper_ViewRenderer();
     $viewRenderer->setView($view);
     Zend_Controller_Action_HelperBroker::addHelper($viewRenderer);
     return $this;
 }
 public function init()
 {
     parent::init();
     $this->view->getHelper('headTitle')->headTitle('VAR_BASE_TITLE');
     $this->view->getHelper('HeadMeta')->appendHttpEquiv('pragma', 'no-cache')->appendHttpEquiv('Cache-Control', 'no-cache')->appendHttpEquiv('Content-Type', 'application/xhtml+xml; charset=UTF-8')->appendHttpEquiv('Content-Language', 'pl-PL');
     //		/->appendName('author', '');
     $this->view->getHelper('Doctype')->setDoctype(Zend_View_Helper_Doctype::XHTML11);
     $this->messages = Dfi_Controller_Action_Helper_Messages::getInstance();
     Zend_Controller_Action_HelperBroker::addHelper($this->messages);
     Zend_Auth::getInstance()->setStorage(new Dfi_Auth_Storage_Cookie('VAR_user'));
     /*   $this->messages->addMessage(Dfi_Controller_Action_Helper_Messages::TYPE_DEBUG, 'test  - DEBUG');
          $this->messages->addMessage('error', 'test');
          $this->messages->addMessage('confirmation', 'test');
          $this->messages->addMessage('notice', 'test');*/
     $this->view->addHelperPath('View/Helper', 'View_Helper');
     $this->view->addBasePath(APPLICATION_PATH . 'views/partials/');
 }
Example #21
0
 protected function _initView()
 {
     $view = new Zend_View();
     $view->addHelperPath("ZendX/JQuery/View/Helper", "ZendX_JQuery_View_Helper");
     $viewRenderer = new Zend_Controller_Action_Helper_ViewRenderer();
     $viewRenderer->setView($view);
     Zend_Controller_Action_HelperBroker::addHelper($viewRenderer);
 }
Example #22
0
 /**
  * Sets up the fixture, for example, open a network connection.
  * This method is called before a test is executed.
  *
  * @access protected
  */
 protected function setUp()
 {
     $view = new Zend_View();
     $view->addBasePath(dirname(__FILE__) . '/_files');
     $view->addHelperPath('Zend/View/Helper/', 'Zend_View_Helper');
     $this->_viewHelper = new Zend_View_Helper_PaginationControl();
     $this->_viewHelper->setView($view);
     $this->_paginator = Zend_Paginator::factory(range(1, 101));
 }
Example #23
0
 protected function _initZendX()
 {
     $view = new Zend_View();
     $view->addHelperPath('ZendX/JQuery/View/Helper/', 'ZendX_JQuery_View_Helper');
     $view->jQuery()->setVersion('1.7');
     $view->jQuery()->setUiVersion('1.8');
     $viewRenderer = new Zend_Controller_Action_Helper_ViewRenderer($view);
     Zend_Controller_Action_HelperBroker::addHelper($viewRenderer);
 }
 /**
  * Инициализирует объект представления.
  * 
  * @return void
  */
 public function init()
 {
     if ($this->view === null) {
         $view = new Zend_View();
         $view->addHelperPath('Rp/View/Helper', 'Rp_View_Helper_');
         $this->setView($view);
     }
     parent::init();
 }
Example #25
0
 protected function _initView()
 {
     $view = new Zend_View();
     $view->doctype('XHTML1_STRICT');
     $viewRenderer = new Zend_Controller_Action_Helper_ViewRenderer();
     $view->addHelperPath('ZendX/JQuery/View/Helper/', 'ZendX_JQuery_View_Helper');
     $viewRenderer->setView($view);
     Zend_Controller_Action_HelperBroker::addHelper($viewRenderer);
 }
Example #26
0
 public function render(Zend_View $view = null)
 {
     if ($view) {
         $view->addHelperPath(Dfi_View_Helper_FormSelectChained::getPath(), 'Dfi_View_Helper');
     } else {
         $this->getView()->addHelperPath(Dfi_View_Helper_FormSelectChained::getPath(), 'Dfi_View_Helper');
     }
     return parent::render($view);
 }
 public function testRenderElement()
 {
     $form = new Zend_Form();
     $form->addElement($this->element);
     $view = new Zend_View();
     $view->addHelperPath('Application/View/Helper', 'Application_View_Helper');
     $form->setAction('/foo.php?bar')->setView($view);
     $html = $form->render();
     $this->assertContains('<input type="date" name="foo" id="foo" value="" disabled="1">', $html);
 }
Example #28
0
 public function getView()
 {
     if (null === $this->_view) {
         $options = $this->getOptions();
         $title = '';
         if (array_key_exists('title', $options)) {
             $title = $options['title'];
             unset($options['title']);
         }
         $view = new Zend_View($options);
         $view->addHelperPath('Zend/Dojo/View/Helper/', 'Zend_Dojo_View_Helper');
         $view->addHelperPath('Awe/Dojo/View/Helper/', 'Awe_Dojo_View_Helper');
         $view->addHelperPath('ZendX/JQuery/View/Helper', 'ZendX_JQuery_View_Helper');
         $viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('ViewRenderer');
         $viewRenderer->setView($view);
         $this->_view = $view;
     }
     return $this->_view;
 }
Example #29
0
 function _initViewHelpers()
 {
     // Config view Zend_Dojo
     $view = new Zend_View();
     $view->addHelperPath('Zend/Dojo/View/Helper/', 'Zend_Dojo_View_Helper');
     $viewRenderer = new Zend_Controller_Action_Helper_ViewRenderer();
     $viewRenderer->setView($view);
     Zend_Controller_Action_HelperBroker::addHelper($viewRenderer);
     // End Config view Zend_Dojo
 }
Example #30
0
 protected function _initView()
 {
     // Initialize view
     $view = new Zend_View();
     $view->doctype('XHTML1_STRICT');
     $view->headMeta()->appendHttpEquiv('Content-Type', 'text/html; charset=utf-8');
     $view->addHelperPath('Zend/Dojo/View/Helper/', 'Zend_Dojo_View_Helper');
     $view->addHelperPath('App/View/Helper/', 'App_View_Helper');
     $view->addHelperPath('ZendX/JQuery/View/Helper', 'ZendX_JQuery_View_Helper');
     Zend_Dojo::enableView($view);
     Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination.phtml');
     // Add it to the ViewRenderer
     $viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('ViewRenderer');
     $viewRenderer->setView($view);
     //seulement si on utilise d'autres frameworks ajax
     ZendX_JQuery_View_Helper_JQuery::enableNoConflictMode();
     // Return it, so that it can be stored by the bootstrap
     return $view;
 }