Пример #1
0
 /**
  * @return array
  */
 public static function getAllFields()
 {
     static $fields = null;
     if ($fields == null) {
         $fields = array_keys(Internals\OrderTable::getMap());
     }
     return $fields;
 }
Пример #2
0
 /**
  * @return array
  */
 public static function getAllFields()
 {
     static $fields = null;
     if ($fields == null) {
         $map = Internals\OrderTable::getMap();
         foreach ($map as $key => $value) {
             if (is_array($value)) {
                 $fields[] = $key;
             } elseif ($value instanceof Entity\ScalarField) {
                 $fields[] = $value->getName();
             }
         }
     }
     return $fields;
 }
Пример #3
0
 /**
  * Function processes and corrects $_REQUEST. Everyting about $_REQUEST lies here.
  * @return void
  */
 protected function processRequest()
 {
     $this->requestData["COPY_ORDER"] = $_REQUEST["COPY_ORDER"] == "Y";
     $this->requestData["ID"] = urldecode(urldecode($this->arParams["ID"]));
     if (strlen($_REQUEST["del_filter"])) {
         unset($_REQUEST["filter_id"]);
         unset($_REQUEST["filter_date_from"]);
         unset($_REQUEST["filter_date_to"]);
         unset($_REQUEST["filter_status"]);
         unset($_REQUEST["filter_payed"]);
         unset($_REQUEST["filter_canceled"]);
         $_REQUEST["filter_history"] = "Y";
         if ($this->arParams["SAVE_IN_SESSION"] == "Y") {
             unset($_SESSION["spo_filter_id"]);
             unset($_SESSION["spo_filter_date_from"]);
             unset($_SESSION["spo_filter_date_to"]);
             unset($_SESSION["spo_filter_status"]);
             unset($_SESSION["spo_filter_payed"]);
             unset($_SESSION["spo_filter_canceled"]);
             $_SESSION["spo_filter_history"] = "Y";
         }
     }
     $this->filterRestore();
     $this->filterStore();
     $tableFieldNameList = array();
     $tableMap = \Bitrix\Sale\Internals\OrderTable::getMap();
     /** @var Main\Entity\Field $tableField */
     foreach ($tableMap as $tableField) {
         $tableFieldNameList[] = $tableField->getName();
     }
     if (isset($_REQUEST["by"]) && strval($_REQUEST['by']) != '') {
         if (!in_array($_REQUEST['by'], $tableFieldNameList)) {
             $_REQUEST["by"] = 'ID';
         }
     }
     $this->sortBy = strlen($_REQUEST["by"]) ? $_REQUEST["by"] : "ID";
     $this->sortOrder = strlen($_REQUEST["order"]) != "" && $_REQUEST["order"] == "ASC" ? "ASC" : "DESC";
     $this->prepareFilter();
 }