From 1b24ddb6b12bd85d15beed45476d72678b758128 Mon Sep 17 00:00:00 2001 From: Malf Furious Date: Wed, 8 Jun 2016 20:21:12 -0400 Subject: Add new MVC, 'Obj' This MVC will be used to browse scrott datastructures. --- app/model/obj.mod.php | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 app/model/obj.mod.php (limited to 'app/model/obj.mod.php') diff --git a/app/model/obj.mod.php b/app/model/obj.mod.php new file mode 100644 index 0000000..bccef93 --- /dev/null +++ b/app/model/obj.mod.php @@ -0,0 +1,23 @@ + -- cgit v1.2.3 From d8f7264898d59a261c0e65e525502143259415ad Mon Sep 17 00:00:00 2001 From: Malf Furious Date: Wed, 8 Jun 2016 21:29:32 -0400 Subject: Create blank view for groups Finish initializing the Obj MVC by writing an empty view/action for groups. --- app/model/obj.mod.php | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'app/model/obj.mod.php') diff --git a/app/model/obj.mod.php b/app/model/obj.mod.php index bccef93..07be4b4 100644 --- a/app/model/obj.mod.php +++ b/app/model/obj.mod.php @@ -15,9 +15,17 @@ */ require_once "model/common.mod.php"; +require_once "class/group.class.php"; class ObjModel extends CommonModel { + /* + * Initialize a group view + */ + function initGroup($guid) + { + $this->group = new Group($guid); + } } ?> -- cgit v1.2.3 From 6c9c352c91814775c6b56c43dd4837a8f3718e86 Mon Sep 17 00:00:00 2001 From: Malf Furious Date: Wed, 8 Jun 2016 23:50:42 -0400 Subject: Start design for group view --- app/model/obj.mod.php | 2 ++ 1 file changed, 2 insertions(+) (limited to 'app/model/obj.mod.php') diff --git a/app/model/obj.mod.php b/app/model/obj.mod.php index 07be4b4..f412e3c 100644 --- a/app/model/obj.mod.php +++ b/app/model/obj.mod.php @@ -25,6 +25,8 @@ class ObjModel extends CommonModel function initGroup($guid) { $this->group = new Group($guid); + $this->owner = $this->group->getOwner(); + $this->members = $this->group->getMembers(); } } -- cgit v1.2.3 From 112a510bb7ba358fd4195b5b2f3c8203ab4fb91d Mon Sep 17 00:00:00 2001 From: Malf Furious Date: Sat, 11 Jun 2016 00:51:46 -0400 Subject: Rename variable In the Obj MVC, rename group in the model to obj. This will help with referencing the active object from template views without knowing what type of object it is. --- app/model/obj.mod.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'app/model/obj.mod.php') diff --git a/app/model/obj.mod.php b/app/model/obj.mod.php index f412e3c..426e1ac 100644 --- a/app/model/obj.mod.php +++ b/app/model/obj.mod.php @@ -24,9 +24,9 @@ class ObjModel extends CommonModel */ function initGroup($guid) { - $this->group = new Group($guid); - $this->owner = $this->group->getOwner(); - $this->members = $this->group->getMembers(); + $this->obj = new Group($guid); + $this->owner = $this->obj->getOwner(); + $this->members = $this->obj->getMembers(); } } -- cgit v1.2.3 From 2adba6a387ac93f750cb795bb39a36077aa7b0de Mon Sep 17 00:00:00 2001 From: Malf Furious Date: Sun, 12 Jun 2016 20:27:57 -0400 Subject: Move initialization logic from Obj model into Common model Some logic to initialize the current system object, its owner, and members has been moved into the Common model since this code will be relevant to other views and to support a new feature being added to display additional tabs in the setting modal box. --- app/model/obj.mod.php | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'app/model/obj.mod.php') diff --git a/app/model/obj.mod.php b/app/model/obj.mod.php index 426e1ac..159c962 100644 --- a/app/model/obj.mod.php +++ b/app/model/obj.mod.php @@ -15,18 +15,15 @@ */ require_once "model/common.mod.php"; -require_once "class/group.class.php"; class ObjModel extends CommonModel { /* - * Initialize a group view + * Constructor */ - function initGroup($guid) + function __construct($guid) { - $this->obj = new Group($guid); - $this->owner = $this->obj->getOwner(); - $this->members = $this->obj->getMembers(); + parent::__construct($guid); } } -- cgit v1.2.3