Snaps in php

php

web programming language

Displaying checkbox for boolean value from database on active form. For example model has field - active....

yii2 active-form checkbox

yii2 select query using raw query binding parameters and data reader...

php yii2 datareader array

For get query from ActiveRecord:...

php framework yii2 activerecord

kohana - Html render anchor with route...

php kohana HTML anchor

php

To get class from namespace path array_pop can be used....

php namespace

Yii2 Active form has two options form enable disable client side validation and ajax validation. Theese option can be set true or false....

php framework yii2 form validation

Yii

yii2 - ActiveForm - specify controller and action. Controller and action are specified in 'action' key of $options array. Also other properties can be used....

php yii controller action form

To find logged user Auth::instance->get_user() method should be used....

php framework kohana logged user

php

Finding subarrays having given property value. Condition for filtering can be used like: and, or...

php array array-filter find

Check if request is post....

php yii2 post

php

php - find index of array for given value...

php array search key

Models generated by Yii2 framework has text input on active form for boolean values. Text input can be changed to dropdown....

php framework yii2 dropdownbox

Variable $groups is an array taken from database or created any other way. Variable $group is used to initialize dropdown list. Any item can be added first to this array first....

php yii2 array dropdownlist

php

php - delete items with empty values from array...

php array delete empty-string

php

Declaring variables with dynamic names from associative array....

php variable dynamic declaration array

Check if request is ajax request....

yii2 php ajax request

Code for select input made from table. Dropdown not using $form->model...

php framework yii2 view drop-down

php

Sort array by key with ascending order. Using ksort function....

php array sort ksort function

Making array from table referenced by foreign key for view made from table having referenced id....

php framework yii2 view foreign-key

Products can have many tags. If model has getter for getting related tags, tags objects can be read with theese getter. Model also has to have tags property declared. Getter and property can be generated with gee with model generation, or can be...

yii2 php frameworks activerecord