49 Fakoli::using(
"menu",
"site",
"role",
"page",
"field_renderers");
60 $title =
"Move Menu Item: {$menuItem->title}";
69 $form->hide(
"title",
"page_id",
"sort_order",
"identifier",
"menu_id",
"url",
"role",
"permissions",
"required_parameters");
70 $form->alias(
"parent_id",
"Move Menu Item To: ");
73 $redirect =
"/admin/menu_item_form?menu_item_id={$menu_item_id}&parent_id={$parent_id}";
77 $form->submitLabel =
"Move Page";
97 $emptyNode =
new TreeNode(
"emptyNode",
"Top Level",
"0", $root_checked,
"tree_node_closed",
"tree_node_open");
106 $node =
new TreeNode(
"menuItemPage_{$menuItem->menu_item_id}",
$menuItem->title,
"",
false,
"tree_node_closed",
"tree_node_open");
110 $node =
new TreeNode(
"menuItemPage_{$menuItem->menu_item_id}",
$menuItem->title,
$menuItem->menu_item_id,
$checked,
"tree_node_closed",
"tree_node_open");
121 if (empty($display[
'parent']))
127 $parentNode =
$displays[ $display[
'parent'] ][
'node'];
128 $parentNode->add($display[
'node']);
137 $script .=
"<link type='text/css' rel='stylesheet' href='/css/tree.css'/>";
139 <h4>Note: when you move a
page, that
page's child pages will move with it. The page's roles will change
to match its
new position: any roles selected
for this page that are not also selected
for its
new parent
page will be removed.</h4>
168 if($string1 != $string2)
170 $roles1 = ($string1) ? explode(
",", $string1) : array();
171 $roles2 = ($string2) ? explode(
",", $string2) : array();
174 $in1Not2 = array_diff($roles1, $roles2);
183 if(count($tobeRemovedRoles) > 0)
185 $childPages = array();
187 foreach($tobeRemovedRoles as $oldRole)
189 foreach($childPages as $child)
191 $child->role = preg_replace(
"/$oldRole,*/",
"", $child->role);
192 $child->filter =
new InclusionFilter(
"role");
195 $child->role = preg_replace(
"/^,*/",
"", $child->role);
213 foreach($children as $child)
215 array_push($childPages, $child);
216 getChildPages($child, $childPages);
static using()
Import the datamodels, views and manifest for the specified component(s).
static usingFile()
Uses the specified framework file(s) from the framework directory.
$method
Pull out a simple reference to the request method.