Authorization and access restriction in Symfony framework (Lesson 14)
So, in this note we will learn how to restrict access to sections of a website written using Symfony framework. Symfony framework provides powerful tools for access control, which allow you to restrict access both by url and entire controllers.
Forms in Symfony framework. Data from multiple tables. (Lesson 13. Forms. Continued)
In the previous lesson, we learned how to create simple forms in Symfony framework that contain (and modify if necessary) data from tables. As you remember, we used models (entities) of these tables.
But in practice, we have to solve more complex tasks. For example, displaying/modifying data from multiple tables in Symfony framework.
A rough example - one table contains articles, and there is a field that sets the section id (which has a separate table). We need to make it possible to conveniently select a section for an article. Fortunately, this is a routine task for Symfony framework. =)
Working with forms in Symfony framework (Lesson 12. Forms. Introduction)
In this note we will learn how to create and handle forms in Symfony framework.
Forms can be created "from scratch" or using an ORM (object-relational mapping) to generate forms based on database tables. Let's start by exploring the second option. In practice, these types of forms are most commonly encountered since in most cases, the data entered in the form needs to be stored somewhere (in a database).
Placement of a project on the Symfony framework on the server
As you know from the lessons, the public directory of Symfony framework by default is web/, and the framework directories lie next to it. This means that for normal operation and pretty URLs, the DocumentRoot on the server should be set specifically to the web/ folder. But this is not always convenient and not always possible on hosting. In most cases, you will not have the ability to edit the DocumentRoot.
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.
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.
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.
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.
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.