Exemplo n.º 1
0
 public function Controller(Application $app)
 {
     try {
         $CrawlerURL = new CrawlerURL($app);
         $CrawlerURL->dropTable();
         // uninstall kit_framework_webmastertools from the CMS
         $admin_tool = new UninstallAdminTool($app);
         $admin_tool->exec(MANUFAKTUR_PATH . '/WebmasterTools/extension.json');
         return $app['translator']->trans('Successfull uninstalled the extension %extension%.', array('%extension%' => 'WebmasterTools'));
     } catch (\Exception $e) {
         throw new \Exception($e);
     }
 }
Exemplo n.º 2
0
 /**
  * Execute all steps needed to setup the WebmasterTools
  *
  * @param Application $app
  * @throws \Exception
  * @return string with result
  */
 public function Controller(Application $app)
 {
     try {
         $this->app = $app;
         $CrawlerURL = new CrawlerURL($app);
         $CrawlerURL->createTable();
         // setup kit_framework_webmastertools as Add-on in the CMS
         $admin_tool = new InstallAdminTool($app);
         $admin_tool->exec(MANUFAKTUR_PATH . '/WebmasterTools/extension.json', '/webmastertools/cms');
         return $app['translator']->trans('Successfull installed the extension %extension%.', array('%extension%' => 'WebmasterTools'));
     } catch (\Exception $e) {
         throw new \Exception($e);
     }
 }
Exemplo n.º 3
0
 /**
  * Show the about dialog for the WebmasterTools
  *
  * @return string rendered dialog
  */
 public function Controller(Application $app)
 {
     $this->initialize($app);
     $crawlerURL = new CrawlerURL($app);
     $sitemaps = array();
     foreach (self::$config['sitemap']['url']['index'] as $url) {
         $exists = $crawlerURL->existsIndexUrl($url, 'SCAN');
         $sitemaps[$url] = array('url' => $url, 'scan' => array('exists' => $exists, 'crawled' => array('last' => array('timestamp' => $crawlerURL->selectLastCrawlDateTime($url, 'SCAN'), 'url' => $crawlerURL->selectLastCrawledURL($url, 'SCAN')), 'total' => $crawlerURL->countCrawledURLs($url, 'SCAN')), 'finished' => $exists && !$crawlerURL->hasPendingURLs($url, 'SCAN')));
     }
     print_r($sitemaps);
     return $this->app['twig']->render($this->app['utils']->getTemplateFile('@phpManufaktur/WebmasterTools/Template', 'admin/sitemaps.twig'), array('usage' => self::$usage, 'toolbar' => $this->getToolbar('sitemaps'), 'alert' => $this->getAlert(), 'config' => self::$config, 'sitemaps' => $sitemaps));
 }