Example #1
0
 public function create($data = null)
 {
     if (isset($data)) {
         $this->data = $data;
     }
     return parent::create();
 }
 /**
  * Builds the SearchCriteria Data Object
  *
  * @return SearchCriteria
  */
 public function create()
 {
     //Initialize with empty array if not set
     if (empty($this->data[SearchCriteria::FILTER_GROUPS])) {
         $this->_set(SearchCriteria::FILTER_GROUPS, []);
     }
     return parent::create();
 }
 /**
  * @param ObjectFactory $objectFactory
  * @param FilterBuilder $filterBuilder
  */
 public function __construct(ObjectFactory $objectFactory, FilterBuilder $filterBuilder)
 {
     parent::__construct($objectFactory);
     $this->_filterBuilder = $filterBuilder;
 }
 /**
  * Builds the SearchCriteria Data Object
  *
  * @return SearchCriteria
  */
 public function create()
 {
     $this->data[SearchCriteria::FILTER_GROUPS] = [$this->filterGroupBuilder->create()];
     $this->data[SearchCriteria::SORT_ORDERS] = [$this->sortOrderBuilder->create()];
     return parent::create();
 }