public function filter()
    {
        $count  = 0;

        $tags = $this->getParameter('Tags');
        if($tags === null)
            $tags = $this->getLocal('LinkTags');

        $maxRows = $this->getParameter('MaxRows');

        $partial = $this->getParameter('Partial');

        $partials = array();
        if(!empty($partial)) {
            $partialsStr = explode(',',$partial);
            foreach($partialsStr as $partial)
                $partials[] = new TagPartial($partial);
        }

        $return = $this->getParameter('Return');
        if(empty($return))
            $return = 'TagLinkTitle';

        $value = '';

        if (empty($tags)) return;
        foreach ((array)$tags as $tag) {
            if (!empty($partials)) {
                    $found = false;
                    foreach($partials as $partial) {
                        if($this->TagsHelper->matchPartial($partial, $tag))
                        {
                            $found = true;
                            break;
                        }
                    }
                    if(!$found)
                        continue;
            }

            if (($this->getParameter('Status.eq') != null) && $tag['TagLinkStatus'] != $this->getParameter('Status.eq'))
                continue;
            if (($this->getParameter('Status.isActive') != null) && empty($tag['TagLinkURL']))
                continue;

            $count++;

            if ($return != 'count' && ($tag instanceof Tag || is_array($tag))) {
                $value .= $tag[$return] . ', ';
            }

            if(!empty($maxRows) && $count == $maxRows)
                break;

        }
        if ($return == 'count')
            return $count;
        if ($this->getParameter('ReturnString') != null)
            $value = str_replace("%ReturnValue%", $value, $this->getParameter('ReturnString'));

        return substr($value, 0, -2);

    }