34 Fakoli::using(
"page",
"menu",
"site",
"field_renderers",
"role",
"taxonomy",
"versioned_content");
45 $cmspage->filter =
new ExclusionFilter(
"menu_id");
50 $title =
"Edit Page Details for {$cmspage->page_title}";
59 $cmspage->archive_date = strftime(
'%Y-%m-%d',
'0000-00-00');
61 $form->alias(
"menu_id",
"Menu");
62 $form->markRequiredFields =
true;
64 $form->required(
"page_title",
"identifier");
65 $form->regexp(
"identifier",
"^[\\w_\\-]+$",
"Identifier must consist of letters, numbers, underscores and dashes only.");
67 $form->readonly(
"created_date");
68 $form->unique(
"identifier",
"A page on the site is already using this name. Please pick a new identifier.");
73 $form->annotate(
"template",
"Fakoli 3 projects use Section Content to set template");
79 $siteSelect =
new RelatedItemSelectFieldRenderer(
$form,
"site_id",
"Site",
Site,
"ORDER BY site_name",
"site_name",
"site_id");
85 function onPageIdentifierUpdated(
field)
87 sectionContentPropertyManager.updateIdentifier(
field.value);
91 $form->getRenderer(
"identifier")->onChange =
"onPageIdentifierUpdated";
106 redirect(
"/admin/pages");
109 $tabs->queryString =
"page_id={$form->data->page_id}";
121 "admin,member" =>
"Admin/Member"
131 <div
class=
'tab_border'>
static usingFeature()
Uses the specified framework feature(s).
static using()
Import the datamodels, views and manifest for the specified component(s).
static assertRole($role, $redirect="", $message="")
Assert that the user has one of the specified roles.
static getRolesArray()
Retrieves the array of roles and their names for the current site for use in a CMS form.
static addTaxonomyFieldRenderers($form, $showSelectAll=true, $group=null, $limitTo=null)
static enableVersioning($form)
$method
Pull out a simple reference to the request method.
if($method=="POST") $redirect