PHP Класс Bolt\Storage\ContentRequest\Save

Prior to v3.0 this functionality existed in \Bolt\Controllers\Backend::editcontent().
Автор: Gawain Lynch ([email protected])
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
$config Bolt\Config
$em Bolt\Storage\EntityManager
$loggerChange Psr\Log\LoggerInterface
$loggerFlash Bolt\Logger\FlashLoggerInterface
$loggerSystem Psr\Log\LoggerInterface
$urlGenerator Symfony\Component\Routing\Generator\UrlGeneratorInterface
$users Bolt\Users

Открытые методы

Метод Описание
__construct ( EntityManager $em, Config $config, Users $users, Psr\Log\LoggerInterface $loggerChange, Psr\Log\LoggerInterface $loggerSystem, Bolt\Logger\FlashLoggerInterface $loggerFlash, Symfony\Component\Routing\Generator\UrlGeneratorInterface $urlGenerator ) Constructor function.
action ( array $formValues, array $contenttype, integer $id, boolean $new, string $returnTo, string $editReferrer ) : Response Do the save for a POSTed record.

Приватные методы

Метод Описание
createJsonUpdate ( Content $content, boolean $flush ) : Symfony\Component\HttpFoundation\JsonResponse Build a valid AJAX response for in-place saves that account for pre/post save events.
generateUrl ( string $name, array $params = [], integer $referenceType = UrlGeneratorInterface::ABSOLUTE_PATH ) : string Shortcut for {@see UrlGeneratorInterface::generate}
logChange ( string $contentType, integer $contentId, Content $newContent = null, Content | null $oldContent = null, string | null $comment = null ) Add a change log entry to track the change.
saveContentRecord ( Content $content, Content | null $oldContent, array $contentType, boolean $new, string $comment, string $returnTo, string $editReferrer ) : Response Commit the record to the database.
setPostedRelations ( Content $content, array | null $formValues ) Convert POST relationship values to an array of Entity objects keyed by ContentType.
setPostedTaxonomies ( Content $content, array | null $formValues ) Set valid POST taxonomies.
setPostedValues ( Content $content, array $formValues, array $contentType ) Set a ContentType record values from a HTTP POST.
setSuccessfulControlValues ( array $formValues, array $fields ) : array Add successful control values to request values, and do needed corrections.
setTransitionStatus ( Bolt\Storage\Entity\Entity $content, string $contentTypeSlug, integer $id, string $oldStatus ) Check whether the status is allowed.

Описание методов

__construct() публичный Метод

Constructor function.
public __construct ( EntityManager $em, Config $config, Users $users, Psr\Log\LoggerInterface $loggerChange, Psr\Log\LoggerInterface $loggerSystem, Bolt\Logger\FlashLoggerInterface $loggerFlash, Symfony\Component\Routing\Generator\UrlGeneratorInterface $urlGenerator )
$em Bolt\Storage\EntityManager
$config Bolt\Config
$users Bolt\Users
$loggerChange Psr\Log\LoggerInterface
$loggerSystem Psr\Log\LoggerInterface
$loggerFlash Bolt\Logger\FlashLoggerInterface
$urlGenerator Symfony\Component\Routing\Generator\UrlGeneratorInterface

action() публичный Метод

Do the save for a POSTed record.
public action ( array $formValues, array $contenttype, integer $id, boolean $new, string $returnTo, string $editReferrer ) : Response
$formValues array
$contenttype array The contenttype data
$id integer The record ID
$new boolean If TRUE this is a new record
$returnTo string
$editReferrer string
Результат Symfony\Component\HttpFoundation\Response

Описание свойств

$config защищенное свойство

protected Config,Bolt $config
Результат Bolt\Config

$em защищенное свойство

protected EntityManager,Bolt\Storage $em
Результат Bolt\Storage\EntityManager

$loggerChange защищенное свойство

protected LoggerInterface,Psr\Log $loggerChange
Результат Psr\Log\LoggerInterface

$loggerFlash защищенное свойство

protected FlashLoggerInterface,Bolt\Logger $loggerFlash
Результат Bolt\Logger\FlashLoggerInterface

$loggerSystem защищенное свойство

protected LoggerInterface,Psr\Log $loggerSystem
Результат Psr\Log\LoggerInterface

$urlGenerator защищенное свойство

protected UrlGeneratorInterface,Symfony\Component\Routing\Generator $urlGenerator
Результат Symfony\Component\Routing\Generator\UrlGeneratorInterface

$users защищенное свойство

protected Users,Bolt $users
Результат Bolt\Users