Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Alto
/
rkn
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit 2659413c
authored
2021-06-02 16:06:28 +0300
by
Скуратович Александр
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
добавмил модельку HostSearch
1 parent
73d52829
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
18 deletions
models/PlantSearch.php → models/HostSearch.php
models/
Plan
tSearch.php
→
models/
Hos
tSearch.php
View file @
2659413
...
...
@@ -4,12 +4,12 @@ namespace app\models;
use
yii\base\Model
;
use
yii\data\ActiveDataProvider
;
use
app\models\
Plan
t
;
use
app\models\
Hos
t
;
/**
*
PlantSearch represents the model behind the search form of `app\models\Plan
t`.
*
HostSearch represents the model behind the search form of `app\models\Hos
t`.
*/
class
PlantSearch
extends
Plan
t
class
HostSearch
extends
Hos
t
{
/**
* {@inheritdoc}
...
...
@@ -17,9 +17,8 @@ class PlantSearch extends Plant
public
function
rules
()
{
return
[
[[
'id'
,
'bush_type'
,
'flower_form'
,
'flower_tint'
,
'cost'
,
'top'
,
'active'
],
'integer'
],
[[
'title'
,
'description'
,
'created_at'
,
'edit_at'
],
'safe'
],
[[
'height'
],
'number'
],
[[
'id'
,
'wis_status'
,
'tix'
],
'integer'
],
[[
'domain'
,
'created_at'
,
'csv_date'
,
'wis_date'
,
'wis_status'
],
'safe'
],
];
}
...
...
@@ -41,7 +40,7 @@ class PlantSearch extends Plant
*/
public
function
search
(
$params
)
{
$query
=
Plan
t
::
find
();
$query
=
Hos
t
::
find
();
// add conditions that should always apply here
...
...
@@ -60,19 +59,14 @@ class PlantSearch extends Plant
// grid filtering conditions
$query
->
andFilterWhere
([
'id'
=>
$this
->
id
,
'height'
=>
$this
->
height
,
'bush_type'
=>
$this
->
bush_type
,
'flower_form'
=>
$this
->
flower_form
,
'flower_tint'
=>
$this
->
flower_tint
,
'created_at'
=>
$this
->
created_at
,
'cost'
=>
$this
->
cost
,
'top'
=>
$this
->
top
,
'active'
=>
$this
->
active
,
'edit_at'
=>
$this
->
edit_at
,
//'created_at' => $this->created_at,
//'csv_date' => $this->csv_date,
//'wis_date' => $this->wis_date,
'wis_status'
=>
$this
->
wis_status
,
'tix'
=>
$this
->
tix
,
]);
$query
->
andFilterWhere
([
'like'
,
'title'
,
$this
->
title
])
->
andFilterWhere
([
'like'
,
'description'
,
$this
->
description
]);
$query
->
andFilterWhere
([
'like'
,
'domain'
,
$this
->
domain
]);
return
$dataProvider
;
}
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment