Example #1
1
 public function __construct()
 {
     $this->headerFooter = HeaderFooterFactory::createHeaderFooter();
     $this->pageHome = PageFactory::createHome();
     $this->database = DatabaseFactory::createDatabase();
     $this->file = FileFactory::setFile();
 }
 /**
  * Index action.
  *
  * @return \Magento\Backend\Model\View\Result\Page
  */
 public function execute()
 {
     /** @var \Magento\Backend\Model\View\Result\Page $resultPage */
     $resultPage = $this->resultPageFactory->create();
     $resultPage->setActiveMenu('Dotdigitalgroup_Email::exclusion_rules');
     $resultPage->addBreadcrumb(__('Rules'), __('Rules '));
     $resultPage->getConfig()->getTitle()->prepend(__('Exclusion Rules'));
     return $resultPage;
 }
Example #3
0
 /**
  * Resolves page from a source string
  * @return SwatPage A subclass of SwatPage is returned.
  */
 protected function resolvePage($source)
 {
     $path = $this->explodeSource($source);
     if (count($path) == 0) {
         // TODO: relocate since there is no separate front page right now
         $this->relocate('tag');
     } else {
         $tag = $path[0];
     }
     switch ($tag) {
         case 'httperror':
             require_once 'Site/pages/SiteHttpErrorPage.php';
             $layout = new PinholeLayout($this, 'Pinhole/layouts/xhtml/default.php');
             $page = new SiteHttpErrorPage($this, $layout);
             break;
         case 'exception':
             require_once 'Pinhole/pages/PinholeExceptionPage.php';
             $layout = new PinholeLayout($this, 'Pinhole/layouts/xhtml/default.php');
             $page = new PinholeExceptionPage($this, $layout);
             break;
         default:
             require_once '../include/PageFactory.php';
             $factory = PageFactory::instance();
             $page = $factory->resolvePage($this, $source);
             break;
     }
     $page->setSource($source);
     return $page;
 }
Example #4
0
 public function login($username, $password)
 {
     $this->eUsername->sendKeys($username);
     $this->ePassword->sendKeys($password);
     $this->submit->click();
     return PageFactory::initElements($this->session, 'Home');
 }
 public function startCase()
 {
     parent::startCase();
     echo "Start StudentSimple system test.\n";
     $this->getSession()->open($this->url);
     $login = PageFactory::initElements($this->session, 'Login');
     $home = $login->login('root', 'ipeeripeer');
 }
 public function startCase()
 {
     parent::startCase();
     echo "Start ImportGroups system test.\n";
     $this->getSession()->open($this->url);
     $login = PageFactory::initElements($this->session, 'Login');
     $home = $login->login('instructor2', 'ipeeripeer');
 }
Example #7
0
 function PageFactory_Error($code = PAGE_FACTORY_ERROR, $mode = PEAR_ERROR_RETURN, $level = E_USER_NOTICE, $debuginfo = null)
 {
     if (is_int($code)) {
         $this->PEAR_Error('PageFactory Error: ' . PageFactory::errorMessage($code), $code, $mode, $level, $debuginfo);
     } else {
         $this->PEAR_Error("PageFactory Error: {$code}", PAGE_FACTORY_ERROR, $mode, $level, $debuginfo);
     }
 }
Example #8
0
 public function testLogin()
 {
     $w = new PHPWebDriver_WebDriverWait($this->session);
     $this->session->deleteAllCookies();
     $login = PageFactory::initElements($this->session, 'Login');
     $home = $login->login('root', 'ipeeripeer');
     $this->assertEqual($this->session->url(), $this->url);
     // make sure we are landed on home page
     $title = $this->session->elementWithWait(PHPWebDriver_WebDriverBy::CSS_SELECTOR, "h1.title")->text();
     $this->assertEqual($title, 'Home');
 }
Example #9
0
 function run()
 {
     $this->_page =& PageFactory::factory($_GET[APPLICATION_PAGE_VAR_NAME]);
     $this->_updateMeStatic();
     if (!PEAR::isError($this->_page)) {
         if (is_object($this->_page) && is_a($this->_page, 'page')) {
             $this->_page->load();
             $this->_page->process();
             $this->_page->display();
             $this->_page->unload();
         }
     } else {
         print $this->_page->getMessage();
     }
 }
Example #10
0
 public function renderResult()
 {
     $request_part = Request::getRequestPart();
     $dot_pos = strpos($request_part, ".");
     $page_name = substr($request_part, 1, $dot_pos - 1);
     $page = PageFactory::create($page_name, new DataHolder());
     Params::push();
     Params::importFromPost(false);
     Params::importFromGet(true);
     ob_start();
     $page->render();
     $page_result = ob_get_contents();
     ob_end_clean();
     Params::pop();
     PageData::instance()->set(Html::get_default_content_save_path(), $page_result);
     render(PageData::instance()->get("/"));
     //trova il layout e renderizza il tutto.
 }
 /**
  * Delete the template placeholder and help pages which were created from insert_site_pages.
  */
 function delete_site_pages()
 {
     $pf = new PageFactory();
     $pf->deleteTemplatePages();
     $pf->deleteHelpPages();
 }
Example #12
0
 /**
  * Slider grid action
  *
  * @return \Magento\Framework\View\Result\Layout
  */
 public function execute()
 {
     $resultLayout = $this->resultPageFactory->create();
     return $resultLayout;
 }
Example #13
0
 public function logoutLogin($username)
 {
     $this->session->elementWithWait(PHPWebDriver_WebDriverBy::LINK_TEXT, 'Logout')->click();
     $w = new PHPWebDriver_WebDriverWait($this->session);
     $session = $this->session;
     $w->until(function ($session) {
         $title = $session->title();
         return $title == 'iPeer - Guard';
     });
     $login = PageFactory::initElements($this->session, 'Login');
     $home = $login->login($username, 'ipeeripeer');
 }
Example #14
0
<?php

PageFactory::add_directory("/" . FRAMEWORK_CORE_PATH . "contenuti/");
PageFactory::add_directory("/contenuti/");
Example #15
0
include 'src/Page.php';
include 'src/PageContent.php';
// classes
include 'src/Asset.php';
include 'src/Documentation.php';
include 'src/ExternalPage.php';
include 'src/Header.php';
include 'src/InternalPage.php';
include 'src/Link.php';
include 'src/Links.php';
include 'src/Navigation.php';
include 'src/OronjoBuy.php';
include 'src/PageFactory.php';
include 'src/SimpleContent.php';
include 'src/Site.php';
include 'src/SoftwareContent.php';
$useLocalAssets = true;
if (count($argv) > 1 && $argv[1] === 'absolute-links') {
    $useLocalAssets = false;
}
if ($useLocalAssets) {
    Asset::useRelative();
    Link::useRelative();
}
$pages = new PageFactory();
$navigation = new Navigation($pages->home());
$navigation->addItem($pages->music())->addDropdown('Software', array_merge(array($pages->software()), $pages->linkedSoftwarePages()))->addItem($pages->contact());
$site = new Site(array($pages->home(), $pages->music(), $pages->contact(), $pages->software(), $pages->error(), $pages->m4lWAI(), $pages->m4lDSM(), $pages->m4lMCM(), $pages->wacNetworkMidi(), $pages->miniakPatchEditor(), $pages->metronome(), $pages->pushWrapper()), $navigation);
$site->clearLastBuild();
$site->render();
echo sprintf("Site built in %fms\n", microtime(true) - $start);