bluzphp /
module-contact-us
| 1 | <?php |
||
| 2 | |||
| 3 | /** |
||
| 4 | * @copyright Bluz PHP Team |
||
| 5 | * @link https://github.com/bluzphp/skeleton |
||
| 6 | */ |
||
| 7 | |||
| 8 | declare(strict_types=1); |
||
| 9 | |||
| 10 | namespace Application\ContactUs; |
||
| 11 | |||
| 12 | use Bluz\Grid\Source\SqlSource; |
||
|
0 ignored issues
–
show
|
|||
| 13 | |||
| 14 | /** |
||
| 15 | * Grid based on SQL |
||
| 16 | * |
||
| 17 | * @category Application |
||
| 18 | * @package ContactUs |
||
| 19 | */ |
||
| 20 | class Grid extends \Bluz\Grid\Grid |
||
|
0 ignored issues
–
show
The type
Bluz\Grid\Grid was not found. Maybe you did not declare it correctly or list all dependencies?
The issue could also be caused by a filter entry in the build configuration.
If the path has been excluded in your configuration, e.g. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths Loading history...
|
|||
| 21 | { |
||
| 22 | public const DEFAULT_LIMIT = 25; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * @var string |
||
| 26 | */ |
||
| 27 | protected $uid = 'contact_us'; |
||
| 28 | |||
| 29 | /** |
||
| 30 | * {@inheritdoc} |
||
| 31 | * @throws \Bluz\Grid\GridException |
||
| 32 | */ |
||
| 33 | public function init(): void |
||
| 34 | { |
||
| 35 | $adapter = new SqlSource(); |
||
| 36 | $adapter->setSource('SELECT * FROM contact_us'); |
||
| 37 | |||
| 38 | $this->setAdapter($adapter); |
||
| 39 | $this->setDefaultLimit(self::DEFAULT_LIMIT); |
||
| 40 | $this->setAllowOrders(['id', 'name', 'email', 'subject', 'markRead', 'markAnswered', 'created', 'updated']); |
||
| 41 | $this->setAllowFilters(['name', 'email', 'subject', 'message', 'markRead', 'markAnswered']); |
||
| 42 | $this->addAlias('markAnswered', 'answered'); |
||
| 43 | $this->addAlias('markRead', 'readed'); |
||
| 44 | } |
||
| 45 | } |
||
| 46 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths