getAction() public method

Get the name of the action.
public getAction ( ) : string
return string
Example #1
0
 /**
  * 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;
 }
Example #2
0
 public function test_shouldDetectTheActionOfTheReportAutomatiacally()
 {
     $this->assertEquals('getExampleReport', $this->exampleReport->getAction());
 }
 private function isAllMetricsReport()
 {
     return $this->report->getModule() == 'API' && $this->report->getAction() == 'get';
 }