66use Kettasoft \Filterable \Support \Payload ;
77use Kettasoft \Filterable \Support \TreeNode ;
88use Kettasoft \Filterable \Traits \FieldNormalizer ;
9- use Kettasoft \Filterable \Engines \Foundation \Clause ;
109use Kettasoft \Filterable \Engines \Foundation \Engine ;
11- use Kettasoft \Filterable \Support \RelationPathParser ;
12- use Kettasoft \Filterable \Support \AllowedFieldChecker ;
1310use Kettasoft \Filterable \Engines \Foundation \ClauseApplier ;
1411use Kettasoft \Filterable \Engines \Foundation \ClauseFactory ;
15- use Kettasoft \Filterable \Support \TreeBasedRelationsResolver ;
1612use Kettasoft \Filterable \Engines \Foundation \Appliers \Applier ;
17- use Kettasoft \Filterable \Engines \Contracts \TreeFilterableContext ;
18- use Kettasoft \Filterable \Engines \Contracts \HasAllowedFieldChecker ;
19- use Kettasoft \Filterable \Support \TreeBasedSignelConditionResolver ;
20- use Kettasoft \Filterable \Engines \Contracts \HasInteractsWithOperators ;
2113
2214class Tree extends Engine
2315{
@@ -41,6 +33,12 @@ public function execute(Builder $builder)
4133 return $ this ->applyNode ($ builder , TreeNode::parse ($ data ));
4234 }
4335
36+ /**
37+ * Apply tree node to the query builder.
38+ * @param \Illuminate\Database\Eloquent\Builder $builder
39+ * @param \Kettasoft\Filterable\Support\TreeNode $node
40+ * @return Builder
41+ */
4442 private function applyNode (Builder $ builder , TreeNode $ node )
4543 {
4644 if ($ node ->isGroup ()) {
@@ -84,24 +82,6 @@ protected function hasNormalizeFieldCondition(): bool
8482 return config ('filterable.engines.tree.normalize_keys ' , false );
8583 }
8684
87- /**
88- * Get allowed fields to filtering.
89- * @return array
90- */
91- protected function getAllowedFieldsFromConfig (): array
92- {
93- return config ('filterable.engines.tree.allowed_fields ' , []);
94- }
95-
96- /**
97- * Get all operators.
98- * @return array
99- */
100- public function operators (): array
101- {
102- return config ('filterable.engines.tree.allowed_operators ' , []);
103- }
104-
10585 /**
10686 * Default operator for use.
10787 * @return mixed|\Illuminate\Config\Repository
@@ -111,21 +91,6 @@ public function defaultOperator()
11191 return config ('filterable.engines.tree.default_operator ' , null );
11292 }
11393
114- public function getOperatorsFromConfig (): array
115- {
116- return config ('filterable.engines.tree.allowed_operators ' , []);
117- }
118-
119- public function isStrictFromConfig (): bool
120- {
121- return config ('filterable.engines.tree.strict ' , true );
122- }
123-
124- public function isIgnoredEmptyValuesFromConfig (): bool
125- {
126- return config ('filterable.engines.tree.ignore_empty_values ' , false );
127- }
128-
12994 /**
13095 * Get engine name.
13196 * @return string
0 commit comments