Page Menu
Home
Mnkras Phabricator
Search
Configure Global Search
Log In
Files
F679386
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Subscribers
None
View Options
diff --git a/controller.php b/controller.php
index 1825b49..e7e4b28 100644
--- a/controller.php
+++ b/controller.php
@@ -1,62 +1,59 @@
<?php
namespace Concrete\Package\CustomMenuItems;
defined('C5_EXECUTE') or die("Access Denied.");
/**
*
* Custom Menu Items Package.
* @author Michael Krasnow <mnkras@gmail.com>
*
*/
class Controller extends \Concrete\Core\Package\Package
{
protected $pkgHandle = 'custom_menu_items';
protected $appVersionRequired = '5.7.0.4';
protected $pkgVersion = '0.9';
public function getPackageDescription()
{
return t("Create menu items for any page on your site.");
}
public function getPackageName()
{
return t("Custom Menu Items");
}
public function install()
{
$pkg = parent::install();
$sp = \SinglePage::add('/dashboard/system/basics/custom_menu_items', $pkg);
- if (is_object($sp))
- {
+ if (is_object($sp)) {
$sp->update(array('cName'=>t('Custom Menu Items')));
}
}
public function on_start()
{
$u = new \User();
- if($u->isLoggedIn())
- {
+ if ($u->isLoggedIn()) {
$db = \Loader::db();
$r = $db->Execute('SELECT * FROM pkgCustomMenuItems ORDER BY DisplayOrder');
- while($row = $r->fetchRow())
- {
+ while ($row = $r->fetchRow()) {
/** @var $menu \Concrete\Core\Application\Service\UserInterface\Menu **/
$menu = \Core::make('helper/concrete/ui/menu');
$menu->addPageHeaderMenuItem(
'custom_menu_item',
'custom_menu_items',
array(
'href' => $row['cID'],
'position' => 'left'
)
);
}
}
}
}
diff --git a/menu_item/custom_menu_item/controller.php b/menu_items/custom_menu_item/controller.php
similarity index 100%
rename from menu_item/custom_menu_item/controller.php
rename to menu_items/custom_menu_item/controller.php
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Mon, Dec 23, 8:48 PM (1 d, 7 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
267607
Attached To
rCMI Custom Menu Items
Event Timeline
Log In to Comment