Wiki

Sorted by date (updated)X
Displaying 1-10 of 785 result(s).

Show raw SQL query

Updated 8 days ago by dariooFAQs0 comments – viewed 1,470 times – version 2.0
Here's a quick tip to dump the SQL for query.

Using loginRequiredAjaxResponse to solve ajax session timeout

Updated 18 days ago by RutgerHow-tos3 comments – viewed 26,172 times – ( +13 ) – version 1.1
This solution requires Yii 1.1.9 or above

Working with relational removals by yii2

Updated about a month ago by AndroideLPTutorials0 comments – viewed 1,750 times – version 2.0
This tutorial shows you how to safely and safely remove relationships between relationships and multiple lines.

How to create/update a model with its related items using Listbox or CheckboxList

Updated about a month ago by softarkTutorials1 comment – viewed 10,014 times – ( +3 ) – version 2.0
Assume we have many categories and many posts.

Yii2's RBAC with three roles (admin, editor, author)

Updated about a month ago by rashmaniHow-tos0 comments – viewed 3,088 times – version 2.0
One of my project needed roles. Needed permissions and authorizations were not complex enough to require additional plugins or extensions, I only wanted to deal with Yii. So, let's see how I did, one may find useful insights too for his/her case.

How to "masquerade" a non-required form element as 'required' one (in the view only)

Updated about a month ago by mrunHow-tos2 comments – viewed 13,904 times – ( +7 / -1 ) – version 1.1
In a nutshell, the task at hand is to mark (or render) a model attribute in the typical "_form.php" view file with the 'required' red asterisk while this attribute is not marked as required in the model's rule() method. If you're interested only in the solution, jump ahead to the 'solution' section below.

Interactive mode command-line command for Yii1

Updated 2 months ago by TrejderHow-tos0 comments – viewed 2,492 times – version 1.1
For one of my projects I needed an interactive console command in Yii 1, i.e. the one that is gathering all information from user in an interactive mode (a serie of questions and answers displayed directly in the console), ignoring command-line arguments at all.

REST API and null values in XML

Updated 2 months ago by marko60Tips0 comments – viewed 3,422 times – version 2.0
I have been working on a REST API using the excellent tools provided by Yii2. My problem was that I have to differentiate between empty values and null values. In other words, <elem></elem> is different from null as it represents an empty string. Also, although some use <elem/> to represent a null value it should still be interpreted as an empty string. In other cases, the absence of the element is taken to represent a null value, but this may create problem with some parsers.
tags: REST, XML, null

Optimize Scenarios for yii2

Updated 2 months ago by AndroideLPTutorials0 comments – viewed 4,372 times – version 2.0
Working with scenarios, with models that can receive many modifications in their rules or structures as development evolves, can create disruptions in the rescue process.

Yii2 GridView Sorting and Searching with a Junction Table Column(Many to Many Relationship)

Updated 2 months ago by Amjad KhanTutorials1 comment – viewed 4,296 times – ( +4 ) – version 2.0
Following is the table structure