Closed rgen3 closed 7 years ago
Next good idea and good work. I'm ready to merge these commits.
Action view generate little bug. $_GET['variable'] every time is string, and condition is_int($id) in Model::findModel($id) have problem. First simple solution, change
public function actionView($id){ $m =
Model::findModel($id);`
for this
$m = Model::find($id)->one();
About Exception, I'll think later.
Action view generate little bug. $_GET['variable'] every time is string
I've thought about that today we can fix it by checking the $id by regex
public static function findModel($id){
if (is_int($id)) {
$where = ['menu_id' => $id];
}
replacing by
public static function findModel($id){
if (preg_match('#[\d]+#'$id)) {
$where = ['menu_id' => $id];
}
I think it fixes the bug
Wow! You've merged all my commits - thanks ))
Why not :)
You implement a lot of interesting changes. It now I plans to change a little. (maybe you already it did)
icons select
until as:
a) option icons - the last in the list, under input the url. hide icons in LINE DIVIDER
b) icons will not break the dropmenu | encode html glyficon in creator/view | more space between link and icon CSS
c) in update item section -> will be able to change the icon - it seems to me that another column in the table is neededmenu_name
in modelAnd by the way, why You use preg_match('#\d+#', $id)
? Not preg_match('/\d+/', $id)
<- standard. I think, it depends on the preference of language, keyboard
Yes, 1,2,3 are good ideas
I used to use # in regex 'cause sometimes it is easier to read regex when you are not schielding slashes
i.e
/http:\/\/example.com\/some\/route\/path /
Adds the possibility to get the meny not only by id, but also by name