PHP Class Bolt\Storage\ContentRequest\Edit

Prior to v3.0 this functionality existed in \Bolt\Controllers\Backend::editcontent().
Author: Gawain Lynch ([email protected])
Show file Open project: bolt/bolt

Protected Properties

Property Type Description
$config Bolt\Config
$em Bolt\Storage\EntityManager
$filesystem Bolt\Filesystem\Manager
$loggerFlash Bolt\Logger\FlashLoggerInterface
$loggerSystem Psr\Log\LoggerInterface
$users Bolt\Users

Public Methods

Method Description
__construct ( EntityManager $em, Config $config, Users $users, Bolt\Filesystem\Manager $filesystem, Psr\Log\LoggerInterface $loggerSystem, Bolt\Logger\FlashLoggerInterface $loggerFlash ) Constructor function.
action ( Content $content, Bolt\Storage\Mapping\ContentType $contentType, boolean $duplicate ) : array Do the edit form for a record.

Private Methods

Method Description
createGroupTabs ( Bolt\Storage\Mapping\ContentType $contentType, array $has ) : array Generate tab groups.
getPublishingDate ( string $date, boolean $setNowOnEmpty = false ) : string Converts database publishing/depublishing dates to values to be used in Twig.
getRelationsList ( Bolt\Storage\Mapping\ContentType $contentType ) : array Convert POST relationship values to an array of Entity objects keyed by ContentType.
getTemplateFieldTemplates ( Bolt\Storage\Mapping\ContentType $contentType, Content $content ) : array Determine which templates will result in templatefields.
getUsedFieldtypes ( Bolt\Storage\Mapping\ContentType $contentType, Content $content, array $has ) : array Create a list of fields types used in regular, template and virtual fields.
neededFields ( array $relationValues, array $relationConfig ) : array Get an array of fields mentioned in the 'format:' for a relationship in contenttypes.

Method Details

__construct() public method

Constructor function.
public __construct ( EntityManager $em, Config $config, Users $users, Bolt\Filesystem\Manager $filesystem, Psr\Log\LoggerInterface $loggerSystem, Bolt\Logger\FlashLoggerInterface $loggerFlash )
$em Bolt\Storage\EntityManager
$config Bolt\Config
$users Bolt\Users
$filesystem Bolt\Filesystem\Manager
$loggerSystem Psr\Log\LoggerInterface
$loggerFlash Bolt\Logger\FlashLoggerInterface

action() public method

Do the edit form for a record.
public action ( Content $content, Bolt\Storage\Mapping\ContentType $contentType, boolean $duplicate ) : array
$content Bolt\Storage\Entity\Content A content record
$contentType Bolt\Storage\Mapping\ContentType The contenttype data
$duplicate boolean If TRUE create a duplicate record
return array

Property Details

$config protected property

protected Config,Bolt $config
return Bolt\Config

$em protected property

protected EntityManager,Bolt\Storage $em
return Bolt\Storage\EntityManager

$filesystem protected property

protected Manager,Bolt\Filesystem $filesystem
return Bolt\Filesystem\Manager

$loggerFlash protected property

protected FlashLoggerInterface,Bolt\Logger $loggerFlash
return Bolt\Logger\FlashLoggerInterface

$loggerSystem protected property

protected LoggerInterface,Psr\Log $loggerSystem
return Psr\Log\LoggerInterface

$users protected property

protected Users,Bolt $users
return Bolt\Users