$entity->touch();
}
- $entity->rebuildPermissions();
$entity->indexForSearch();
$this->referenceStore->updateForEntity($entity);
/**
* Sort the parent of the given entity, if any auto sort actions are set for it.
- * Typical ran during create/update/insert events.
+ * Typically ran during create/update/insert events.
*/
public function sortParent(Entity $entity): void
{
$draft->priority = $this->getNewPriority($draft);
$this->updateTemplateStatusAndContentFromInput($draft, $input);
$this->baseRepo->update($draft, $input);
+ $draft->rebuildPermissions();
$summary = trim($input['summary'] ?? '') ?: trans('entities.pages_initial_revision');
$this->revisionRepo->storeNewForPage($draft, $summary);
/**
* Directly update the content for the given page from the provided input.
* Used for direct content access in a way that performs required changes
- * (Search index & reference regen) without performing an official update.
+ * (Search index and reference regen) without performing an official update.
*/
public function setContentFromInput(Page $page, array $input): void
{
namespace BookStack\Sorting;
-use BookStack\App\Model;
use BookStack\Entities\Models\Book;
use BookStack\Entities\Models\BookChild;
use BookStack\Entities\Models\Chapter;