eZPublishCommunityProject  2013.9
eZ\Publish\Core\MVC\Symfony\Controller\Content\ViewController Class Reference
+ Inheritance diagram for eZ\Publish\Core\MVC\Symfony\Controller\Content\ViewController:
+ Collaboration diagram for eZ\Publish\Core\MVC\Symfony\Controller\Content\ViewController:

Public Member Functions

 __construct (ViewManager $viewManager)
 
 viewContent ($contentId, $viewType, $layout=false, array $params=array())
 Main action for viewing content. More...
 
 viewLocation ($locationId, $viewType, $layout=false, array $params=array())
 Main action for viewing content through a location in the repository. More...
 
- Public Member Functions inherited from eZ\Publish\Core\MVC\Symfony\Controller\Controller
 getConfigResolver ()
 
 getEventDispatcher ()
 
 getLogger ()
 
 getParameter ($parameterName, $defaultValue=null)
 Returns value for $parameterName and fallbacks to $defaultValue if not defined. More...
 
 getRepository ()
 
 getRequest ()
 
 getTemplateEngine ()
 
 hasParameter ($parameterName)
 Checks if $parameterName is defined. More...
 
 isGranted (AuthorizationAttribute $attribute)
 Checks if current user has granted access to provided attribute. More...
 
 render ($view, array $parameters=array(), Response $response=null)
 Renders a view. More...
 

Protected Member Functions

 buildResponse ($etag=null, DateTime $lastModified=null)
 Build the response so that depending on settings it's cacheable. More...
 
 handleViewException (Response $response, $params, Exception $e, $viewType, $contentId=null, $locationId=null)
 
 performAccessChecks ()
 Performs the access checks. More...
 
 renderContent ($content, $viewType, $layout=false, array $params=array())
 Creates the content to be returned when viewing a Content. More...
 
 renderLocation ($location, $viewType, $layout=false, array $params=array())
 Creates the content to be returned when viewing a Location. More...
 

Protected Attributes

 $viewManager
 

Constructor & Destructor Documentation

eZ\Publish\Core\MVC\Symfony\Controller\Content\ViewController::__construct ( ViewManager  $viewManager)

Member Function Documentation

eZ\Publish\Core\MVC\Symfony\Controller\Content\ViewController::buildResponse (   $etag = null,
DateTime  $lastModified = null 
)
protected

Build the response so that depending on settings it's cacheable.

Parameters
string | null$etag
\DateTime | null$lastModified
Returns

Referenced by eZ\Publish\Core\MVC\Symfony\Controller\Content\ViewController\viewContent(), and eZ\Publish\Core\MVC\Symfony\Controller\Content\ViewController\viewLocation().

eZ\Publish\Core\MVC\Symfony\Controller\Content\ViewController::handleViewException ( Response  $response,
  $params,
Exception  $e,
  $viewType,
  $contentId = null,
  $locationId = null 
)
protected
eZ\Publish\Core\MVC\Symfony\Controller\Content\ViewController::performAccessChecks ( )
protected
eZ\Publish\Core\MVC\Symfony\Controller\Content\ViewController::renderContent (   $content,
  $viewType,
  $layout = false,
array  $params = array() 
)
protected

Creates the content to be returned when viewing a Content.

Parameters
Content$content
string$viewType
boolean$layout
array$params

Referenced by eZ\Publish\Core\MVC\Symfony\Controller\Content\ViewController\viewContent().

eZ\Publish\Core\MVC\Symfony\Controller\Content\ViewController::renderLocation (   $location,
  $viewType,
  $layout = false,
array  $params = array() 
)
protected

Creates the content to be returned when viewing a Location.

Parameters
Location$location
string$viewType
boolean$layout
array$params

Referenced by eZ\Publish\Core\MVC\Symfony\Controller\Content\ViewController\viewLocation().

eZ\Publish\Core\MVC\Symfony\Controller\Content\ViewController::viewContent (   $contentId,
  $viewType,
  $layout = false,
array  $params = array() 
)

Main action for viewing content.

Response will be cached with HttpCache validation model (Etag)

Parameters
int$contentId
string$viewType
boolean$layout
array$params
Exceptions
\Symfony\Component\Security\Core\Exception\AccessDeniedException
\Exception
Returns
eZ\Publish\Core\MVC\Symfony\Controller\Content\ViewController::viewLocation (   $locationId,
  $viewType,
  $layout = false,
array  $params = array() 
)

Main action for viewing content through a location in the repository.

Response will be cached with HttpCache validation model (Etag)

Parameters
int$locationId
string$viewType
boolean$layout
array$params
Exceptions
\Symfony\Component\Security\Core\Exception\AccessDeniedException
\Exception
Returns

Member Data Documentation

eZ\Publish\Core\MVC\Symfony\Controller\Content\ViewController::$viewManager
protected

The documentation for this class was generated from the following file: