473,321 Members | 1,877 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,321 software developers and data experts.

Symfony, services,

103 100+
I follow online course about Symfony.
https://www.udemy.com/introduction-to-web-development-with-symfony2/#/lecture/934594

In lecture 79 they create service for Author:

myproject\src\Blog\CoreBundle\Controller\AuthorCon troller.php

Expand|Select|Wrap|Line Numbers
  1. class AuthorController extends Controller
  2. {
  3.     public function showAction($slug)
  4.     {
  5.         $author = $this->getAuthorManager()->findBySlug($slug);
  6.         $posts = $this->getAuthorManager()->findPosts($author);
  7.  
  8.         return array(
  9.             'author'=>$author, 
  10.             'posts'=>$posts
  11.         );    
  12.  
  13.     }
  14.  
  15.     private function getAuthorManager()
  16.     {
  17.         return $this->get('authorManager');
  18.     }
  19. }
I do not understand from where they call methods:
->findBySlug($slug) and ->findPosts($author).

How to find this place in code?
Apr 6 '15 #1
1 1174
gintare
103 100+
They are defined in file
myproject\src\Blog\CoreBundle\Services\AuthorManag er.php
Apr 6 '15 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Narko | last post by:
Symfony Lessons I propose self-written free Symfony framework lessons for everyone: http://narkozateam.com/symfony/ If you want to know more about PHP, AJAX, MVC - take a look there and give me...
0
by: php.developer2007 | last post by:
I m getting this error when i type this at php symfony -V or symfony - V "Could not open input file: symfony" Help me if any one can
10
by: gintare | last post by:
I sit already 2h browsing internet and i am not able to find a solution. Could you please help me. Bitnami WAMP, Symfony 1) I am not able to login to MYSQL through console using command: mysql...
0
by: gintare | last post by:
The question is how to tell to doctrine:migration:diff to generate migration for certain entity (there are several entities and in my case diff recognise only the first of them "Workout", does not...
2
by: gintare | last post by:
1) Symfony, where is defined the method getRepository? I have a line in the code: $posts = $this->getDoctrine()->getRepository('ModelBundle:Post)->findAll(); i do not understand in which file...
1
by: gintare | last post by:
Could you please help me with "Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException" . You have requested a non-existent parameter "Could not determine the Doctrine manager....
0
by: gintare | last post by:
I am trying to make symfony project cms1 and install CMS bundles to it: cd to folder where the symfony is installed create project: c:\> php symfony.phar new cmf1 run the project: $ cd .\cmf1...
1
by: gintare | last post by:
I am trying to install Symfony CMS according to http://symfony.com/doc/current/cmf/book/installation.html#set-up-the-database I am not able to set-up the database. I am getting the error:...
0
by: gintare | last post by:
There are three questions. I am following the Symfony tutorial: http://symfony.com/doc/master/cmf/tutorial/content-to-controllers.html (It starts from :...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.