getAction() public method

Get the name of the action.
public getAction ( ) : string
return string
コード例 #1
0
ファイル: ReportWidgetFactory.php プロジェクト: piwik/piwik
 /**
  * Creates a widget based on the specified report in {@link construct()}.
  *
  * It will automatically use the report's name, categoryId, subcategoryId (if specified),
  * defaultViewDataTable, module, action, order and parameters in order to create the widget.
  *
  * @return ReportWidgetConfig
  */
 public function createWidget()
 {
     $widget = new ReportWidgetConfig();
     $widget->setName($this->report->getName());
     $widget->setCategoryId($this->report->getCategoryId());
     if ($this->report->getDefaultTypeViewDataTable()) {
         $widget->setDefaultViewDataTable($this->report->getDefaultTypeViewDataTable());
     }
     if ($this->report->getSubcategoryId()) {
         $widget->setSubcategoryId($this->report->getSubcategoryId());
     }
     $widget->setModule($this->report->getModule());
     $widget->setAction($this->report->getAction());
     $orderThatListsReportsAtTheEndOfEachCategory = 100 + $this->report->getOrder();
     $widget->setOrder($orderThatListsReportsAtTheEndOfEachCategory);
     $parameters = $this->report->getParameters();
     if (!empty($parameters)) {
         $widget->setParameters($parameters);
     }
     return $widget;
 }
コード例 #2
0
ファイル: ReportTest.php プロジェクト: TensorWrenchOSS/piwik
 public function test_shouldDetectTheActionOfTheReportAutomatiacally()
 {
     $this->assertEquals('getExampleReport', $this->exampleReport->getAction());
 }
コード例 #3
0
 private function isAllMetricsReport()
 {
     return $this->report->getModule() == 'API' && $this->report->getAction() == 'get';
 }