コード例 #1
0
ファイル: CatalogCommand.php プロジェクト: rpcjacobs/magescan
 /**
  * Execute command
  *
  * @param InputInterface  $input
  * @param OutputInterface $output
  *
  * @return void
  */
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $rows = [];
     $catalog = new Catalog();
     $catalog->setRequest($this->request);
     $categoryCount = $catalog->categoryCount();
     $rows[] = ['Categories', $categoryCount !== false ? $categoryCount : 'Unknown'];
     $productCount = $catalog->productCount();
     $rows[] = ['Products', $productCount !== false ? $productCount : 'Unknown'];
     $this->out('Catalog Information', [['type' => 'table', 'data' => [['Type', 'Count'], $rows]]]);
 }
コード例 #2
0
ファイル: CatalogCommand.php プロジェクト: salt-lick/magescan
 /**
  * Execute command
  *
  * @param InputInterface  $input
  * @param OutputInterface $output
  *
  * @return void
  */
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $this->writeHeader('Catalog Information');
     $rows = array();
     $catalog = new Catalog();
     $catalog->setRequest($this->request);
     $categoryCount = $catalog->categoryCount($this->url);
     $rows[] = array('Categories', $categoryCount !== false ? $categoryCount : 'Unknown');
     $productCount = $catalog->productCount($this->url);
     $rows[] = array('Products', $productCount !== false ? $productCount : 'Unknown');
     $table = new Table($this->output);
     $table->setHeaders(array('Type', 'Count'))->setRows($rows)->render();
 }
コード例 #3
0
 /**
  * Execute command
  *
  * @param InputInterface  $input
  * @param OutputInterface $output
  *
  * @return void
  */
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $rows = array();
     $catalog = new Catalog();
     $catalog->setRequest($this->request);
     $categoryCount = $catalog->categoryCount($this->url);
     $productCount = $catalog->productCount($this->url);
     if ($input->getOption('json')) {
         $return = ["Categories" => $categoryCount !== false ? $categoryCount : 'Unknown', "Prodcuts" => $productCount !== false ? $productCount : 'Unknown'];
         $output->write(json_encode($return));
     } else {
         $rows = [['Categories', $categoryCount !== false ? $categoryCount : 'Unknown'], ['Products', $productCount !== false ? $productCount : 'Unknown']];
         $this->writeHeader('Catalog Information');
         $table = new Table($this->output);
         $table->setHeaders(array('Type', 'Count'))->setRows($rows)->render();
     }
 }
コード例 #4
0
ファイル: Http.php プロジェクト: salt-lick/magescan
 /**
  * Check for catalog information
  *
  * @return void
  */
 public function checkCatalog()
 {
     $rows = array();
     $catalog = new Catalog();
     $categoryCount = $catalog->categoryCount($this->url);
     $rows[] = array('<a href="' . $this->url . 'catalog/seo_sitemap/category" target="_blank">Categories</a>', $categoryCount !== false ? $categoryCount : 'Unknown');
     $productCount = $catalog->productCount($this->url);
     $rows[] = array('<a href="' . $this->url . 'catalog/seo_sitemap/product" target="_blank">Products</a>', $productCount !== false ? $productCount : 'Unknown');
     $this->respond(array('body' => $rows));
 }
コード例 #5
0
ファイル: Http.php プロジェクト: rpcjacobs/magescan
 /**
  * Check for catalog information
  *
  * @return void
  */
 public function checkCatalog()
 {
     $rows = [];
     $catalog = new Catalog();
     $catalog->setRequest($this->request);
     $categoryCount = $catalog->categoryCount();
     $rows[] = ['<a href="' . $this->url . 'catalog/seo_sitemap/category" target="_blank">Categories</a>', $categoryCount !== false ? $categoryCount : 'Unknown'];
     $productCount = $catalog->productCount();
     $rows[] = ['<a href="' . $this->url . 'catalog/seo_sitemap/product" target="_blank">Products</a>', $productCount !== false ? $productCount : 'Unknown'];
     $this->respond(['body' => $rows]);
 }