Modern browsers support SVG, older browsers do not. This replacement for CHtml::image() allows you to handle to propose SVG in an efficient way with PNG as a fallback.
Modern browsers support SVG, older browsers do not. This replacement for CHtml::image() allows you to handle to propose SVG in an efficient way with PNG as a fallback.
https://schema.org is a markup system that allows to embed structured data on their web pages for use by search engines and other applications. Let's see how to add Schema.org to our pages on Yii2 based websites using JSON-LD.
This is a reference about model validators and user roles. In many cases we want model validators to applied only for some privileged users or not
Does your application need to know user's details on browser details, os and device type? We can use PHP's misc. function to achieve that provided you have an update copy of browsercap.ini
yii rights some tips..
Example settings when using Gettext for i18n.
After getting lot's of error and don't know how to perform multiple images api in yii2 finally I get it today
To secure your database from inconsistencies resulting from failing (complex) operations, you (should) use transactions. However, complex methods often rely on other complex methods that themselves build on transactions. This HowTo presents a method to nest or embed transactions without relying on the database's nesting capabilities.
\yii\mail\BaseMailer::useFileTransport is a great tool. If you activate it, all
emails sent trough this mailer will be saved (by default) on @runtime/mail
instead of being sent, allowing the devs to inspect thre result.
When using themes you want to changes some of the translations specifically to the theme while keeping the standard translations for most of the text. Duplicating the main translation file is a headache for maintainance. This how to provides a solution.
Articles are separated into more files as there is the max lenght for each file on wiki.
Clearing CGridView filters and sort orders from the web pages, is usefull for the end user. Yii does not seem to propose a standard method. Furthermore, this is especially usefull when filters are "remembered" in the user's session.
Hey Everyone, In this post I Just shared my Experience what most of interviewer ask in YII2 Interview.
A dropdown list can be used to select a value, based on which we can filter the data to be displayed. For example, the extension page has a dropdown list to filter the displayed extensions according to the selected category.
Here are all wiki articles from "Understanding" series by Yii wiki contributors:
>Highslide JS is an open source JavaScript software, offering a Web 2.0 approach to popup windows. It streamlines the use of thumbnail images and HTML popups on web pages. > > + No plugins like Flash or Java required. > + Popup blockers are no problem. The content expands within the active browser window. > + Single click. After opening the image or HTML popup, the user can scroll further down...
I have a calls which help me display json directly in html table.
This is an incipient implementation of application-driven database with Yii.
GridView show sum of columns in footer
`
PHP
use yii\grid\DataColumn;