Work with Doctrine in Symfony framework. DQL (Lesson 11. Doctrine. Continuation)
In the previous note, we learned how to write simple queries to the database using Doctrine. But often we have to write something more kinky, with these joins of yours =). Here we will try to understand how it's done.
Expanding a block to the empty space of the parent element (div expand)
Today I came across an unpleasant problem - when using block layout, I needed to stretch a block to fill the empty space of the parent element vertically (div expand). Naturally, there is no difficulty in doing this horizontally - simply set the display to block and it will work =).
Working with Doctrine in Symfony framework. Basics (Lesson 10. Doctrine)
So, we already know theoretically (here you can read), why Doctrine, what advantages it provides compared to "bare" sql queries. Now we move on to practice.
Working with databases in the Symfony framework. Introduction (Lesson 9. Getting acquainted with Doctrine)
We are no longer children, we already know how to work with controller, configure routing system for handling input data by the controller, and create view. The next logical step will be learning working with databases in Symfony framework using Doctrine as an example.
List of routine web programming tasks
When studying a new framework or web programming language, you may sometimes feel confused and ask yourself: When can I consider that I have learned the product to a decent level? When can I say that I know it, and if there are some things I don't know, I can quickly grasp/read them in the manual/search for them on Google?
Symfony framework. Templates. Assets. Assetic. Stylesheets (Lesson 8. Assets and Twig)
So, in the previous lesson we learned how to use the Twig template engine in the Symfony framework. Now we know how to write a simple template. But we don't know how to include external components (stylesheets, js, images), as well as create links to our own pages.
Form without tables
To create a form using tables, even a beginner webmaster can do it, but for formatting a tableless form, some skills are required. Let's consider a simple example, such as a login form.
Using templates in Symfony framework. (Lesson 7. Twig)
Using templates in Symfony framework can be done in several ways. First, you can use PHP templates. But the preferred option is to use the Twig template engine (by default). Twig is a compiling open-source template engine written in PHP. It produces PHP/HTML code as output. Besides being very functional, Twig is also very fast.
Routing in the Symfony framework (Lesson 6: Routing)
After learning how to create controllers (here), it is important to understand how a user can invoke a controller and how to work with it.
The Symfony framework has a special feature called routing system. In yii framework , for example, routing is determined by the file structure of the application by default (although you can still use a routing system with the necessary tools). However, in Symfony framework, you have to define the routing manually (excluding the basic routing created by the bundle generator).
Structure of a Symfony application (Lesson 3. Basics)
After familiarizing yourself with the Symfony framework. Introduction and successfully installing this framework Installing Symfony 2.*, let's start studying the basics - the Symfony application structure.
The key feature of developing with Symfony is the bundle system. A bundle is a collection of scripts (php, js, etc.) (and not only (html, css, etc.)) that are used to achieve a common goal.
Ruby programming language
Ruby - is a programming language with complex, but expressive grammar and a basic class library with a rich and powerful API. Ruby incorporates features from languages such as Lisp, Perl, and Smalltalk, and uses a grammar that programmers familiar with C and Java languages can learn. Ruby is a fully object-oriented language, but it also supports procedural and functional programming styles.
Installation of Symfony 2.* (Lesson 2. Preparation)
So ... We have already familiarized ourselves with Symfony framework (here) and gained the courage to install it. Symfony installation can be done in two ways. The first one is manual - download the archive from the official website (http://symfony.com/, just in case =)) All according to the standard - download, unpack to the web server directory, use.
Symfony framework. Introduction (Lesson 1. Familiarization)
Symfony - a web development tool, framework, application skeleton written in php 5. It supports multiple databases: MySQL, SQLite, PostgreSQL, etc.