|
@@ -11,13 +11,13 @@ discard block |
|
|
block discarded – undo |
|
11
|
11
|
|
|
12
|
12
|
class CategoryTerm extends TagTerm implements IHierarchicalTerm |
|
13
|
13
|
{ |
|
14
|
|
- public $templateFile = '@nkostadinov/taxonomy/migrations/template/category.php' ; |
|
|
14
|
+ public $templateFile = '@nkostadinov/taxonomy/migrations/template/category.php'; |
|
15
|
15
|
|
|
16
|
16
|
public function getTerms($object_id, $name = []) |
|
17
|
17
|
{ |
|
18
|
18
|
$query = TaxonomyTerms::find() |
|
19
|
|
- ->select(TaxonomyTerms::tableName() . '.term') |
|
20
|
|
- ->innerJoin($this->table, $this->table . '.term_id = taxonomy_terms.id') |
|
|
19
|
+ ->select(TaxonomyTerms::tableName().'.term') |
|
|
20
|
+ ->innerJoin($this->table, $this->table.'.term_id = taxonomy_terms.id') |
|
21
|
21
|
->andFilterWhere(['taxonomy_terms.term' => $name]); |
|
22
|
22
|
|
|
23
|
23
|
if ($object_id) { |
|
@@ -44,7 +44,7 @@ discard block |
|
|
block discarded – undo |
|
44
|
44
|
{ |
|
45
|
45
|
$cachedParents = []; |
|
46
|
46
|
|
|
47
|
|
- $addTerm = function ($parent, $item) use ($object_id, &$cachedParents) { |
|
|
47
|
+ $addTerm = function($parent, $item) use ($object_id, &$cachedParents) { |
|
48
|
48
|
$term = $this->getTaxonomyTerm($item); |
|
49
|
49
|
$data['term_id'] = $term->id; |
|
50
|
50
|
$data['object_id'] = $object_id; |
Please login to merge, or discard this patch.