123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123 |
- <?php
- /*
- * This file is part of the Sonata package.
- *
- * (c) Thomas Rabaix <thomas.rabaix@sonata-project.org>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
- namespace Sonata\AdminBundle\Filter;
- interface FilterInterface
- {
- /**
- * Apply the filter to the QueryBuilder instance
- *
- * @abstract
- * @param $queryBuilder
- * @param string $alias
- * @param string $field
- * @param string $value
- * @return void
- */
- function filter($queryBuilder, $alias, $field, $value);
- /**
- * @abstract
- * @param $query
- * @param $value
- */
- function apply($query, $value);
- /**
- * Returns the filter name
- * @abstract
- * @return string
- */
- function getName();
- /**
- * Returns the filter form name
- * @abstract
- * @return string
- */
- function getFormName();
- /**
- * Returns the label name
- *
- * @abstract
- * @return string
- */
- function getLabel();
- /**
- * @abstract
- *
- * @param string $label
- */
- function setLabel($name);
- /**
- * @abstract
- * @return array
- */
- function getDefaultOptions();
- /**
- * @abstract
- * @param string $name
- * @param null $default
- * @return mixed
- */
- function getOption($name, $default = null);
- /**
- * @abstract
- * @param $name
- * @param $value
- */
- function setOption($name, $value);
- /**
- * @abstract
- * @param $name
- * @param array $options
- * @return void
- */
- function initialize($name, array $options = array());
- /**
- * @abstract
- * @return string
- */
- function getFieldName();
- /**
- * @return array of mappings
- */
- function getParentAssociationMappings();
- /**
- * @abstract
- * @return array
- */
- function getFieldOptions();
- /**
- * @abstract
- * @return string
- */
- function getFieldType();
- /**
- * Returns the main widget used to render the filter
- *
- * @abstract
- * @return array
- */
- function getRenderSettings();
- }
|