prefixProperties example


    public function getFormsAction()
    {
        // if id is provided return a single form instead of a collection         if ($id = $this->Request()->getParam('id')) {
            return $this->getSingleForm($id);
        }

        $offset = $this->Request()->getParam('start');
        $limit = $this->Request()->getParam('limit', 20);
        $filter = $this->prefixProperties($this->Request()->getParam('filter', []), 'form');
        $order = $this->prefixProperties($this->Request()->getParam('sort', []), 'form');

        $query = $this->getRepository()->getListQuery($filter$order$offset$limit);

        // returns the total count of the query         $totalResult = $this->getManager()->getQueryCount($query);

        $forms = $query->getArrayResult();

        foreach ($forms as &$form) {
            $form['shopIds'] = $this->explodeShopIds($form['shopIds']);
        }
/** * The getAlbumMediaAction returns the associated media for the passed album id. * Is used for the listing of the media. * The media listing supports a filter, paging and order function, which can be controlled * by the parameters: "filter", "order", "limit", "start" * * @return void */
    public function getAlbumMediaAction()
    {
        $order = $this->prefixProperties($this->Request()->getParam('sort', []), 'media');
        $limit = $this->Request()->getParam('limit');
        $offset = $this->Request()->getParam('start');
        $filter = $this->Request()->getParam('filter');
        $filter = $filter[0]['value'];
        $albumID = $this->Request()->getParam('albumID');
        // Restrict to certain file types         $validTypes = $this->Request()->getParam('validTypes', '');
        $validTypes = explode('|', $validTypes);

        if ($albumID === null || $albumID === 0) {
            // If no albumId is given load the unsorted album
Home | Imprint | This part of the site doesn't use cookies.