Permalink
Browse files

Start on Head

  • Loading branch information...
1 parent 02b485d commit e270ed4173d520cb005b72f6b89955d4edce90d7 Amy Stephen committed May 18, 2012
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<model
+ name="Assets"
+ catalog_type_id="0"
+ table="#__dummy"
+ primary_key=""
+ primary_prefix=""
+ get_customfields="0"
+ get_item_children="0"
+ use_special_joins="0"
+ check_view_level_access="0"
+ data_source="Asset">
+</model>
@@ -6,9 +6,11 @@
*/
namespace Molajo\Extension\Includer;
+use Molajo\Application;
use Molajo\Extension\Helpers;
use Molajo\Service\Services;
use Molajo\Extension\Includer;
+use Molajo\MVC\Controller\DisplayController;
defined('MOLAJO') or die;
@@ -21,7 +23,6 @@
*/
Class HeadIncluder extends Includer
{
-
/**
* __construct
*
@@ -39,8 +40,20 @@ public function __construct($name = null, $type = null, $items = null)
Services::Registry()->set('Include', 'extension_catalog_type_id', 0);
$this->extension_required = false;
parent::__construct($name, $type, $items);
- Services::Registry()->set('Parameters', 'criteria_html_display_filter', false);
- return $this;
+ return Services::Registry()->set('Parameters', 'criteria_html_display_filter', false);
+ }
+
+ /**
+ * getExtension
+ *
+ * Retrieve extension information after looking up the ID in the extension-specific includer
+ *
+ * @return bool
+ * @since 1.0
+ */
+ protected function getExtension($extension_id = null)
+ {
+ return;
}
/**
@@ -51,19 +64,17 @@ public function __construct($name = null, $type = null, $items = null)
* @return bool
* @since 1.0
*/
- protected function getApplicationDefaults()
+ protected function setRenderCriteria()
{
- Services::Registry()->set('Parameters', 'model', 'HeadModel');
- Services::Registry()->set('Parameters', 'action', 'display');
+ Services::Registry()->set('Parameters', 'display_view_on_no_results', 1);
if ((int)Services::Registry()->get('Parameters', 'template_view_id', 0) == 0) {
Services::Registry()->set('Parameters', 'template_view_id',
- Services::Registry()->get('Configuration', 'head_template_view_id', 'DocumentHead'));
+ Services::Registry()->get('Parameters', 'head_template_view_id'));
}
-
if ((int)Services::Registry()->get('Parameters', 'wrap_view_id', 0) == 0) {
Services::Registry()->set('Parameters', 'wrap_view_id',
- Services::Registry()->get('Configuration', 'head_wrap_view_id', 'none'));
+ Services::Registry()->get('Parameters', 'message_wrap_view_id'));
}
if ($this->type == 'defer') {
@@ -72,6 +83,48 @@ protected function getApplicationDefaults()
Services::Registry()->set('Parameters', 'defer', 0);
}
+ parent::setRenderCriteria();
+
return true;
}
+
+ /**
+ * Loads Language Files for extension
+ *
+ * @return null
+ * @since 1.0
+ */
+ protected function loadLanguage()
+ {
+ }
+
+ /**
+ * Loads Media CSS and JS files for Template and Wrap Views
+ *
+ * @return null
+ * @since 1.0
+ */
+ protected function loadViewMedia()
+ {
+ }
+
+ /**
+ * Instantiate the Controller and fire off the action, returns rendered output
+ *
+ * @return mixed
+ */
+ protected function invokeMVC()
+ {
+ $controller = new DisplayController();
+
+ echo '<pre>';
+ var_dump(Services::Registry()->get('Parameters'));
+ echo '</pre>';
+
+ Services::Registry()->set('Parameters', 'model_name', 'Assets');
+ Services::Registry()->set('Parameters', 'model_type', 'Table');
+ Services::Registry()->set('Parameters', 'query_object', 'getAssets');
+
+ return $controller->Display();
+ }
}
@@ -88,15 +88,19 @@ protected function setRenderCriteria()
* @return null
* @since 1.0
*/
- protected function loadLanguage() {}
+ protected function loadLanguage()
+ {
+ }
/**
* Loads Media CSS and JS files for Template and Wrap Views
*
* @return null
* @since 1.0
*/
- protected function loadViewMedia() {}
+ protected function loadViewMedia()
+ {
+ }
/**
* Instantiate the Controller and fire off the action, returns rendered output
@@ -36,6 +36,7 @@
public function __construct($name = null, $type = null, $items = null)
{
Services::Registry()->set('Include', 'extension_catalog_type_id', CATALOG_TYPE_EXTENSION_MODULE);
+
return parent::__construct($name, $type, $items);
}
@@ -49,9 +50,7 @@ public function __construct($name = null, $type = null, $items = null)
*/
protected function getExtension($extension_id = null)
{
- $extension_id = Helpers::Module()->get(
- Services::Registry()->get('Include', 'extension_title')
- );
+ $extension_id = Helpers::Module()->get(Services::Registry()->get('Include', 'extension_title'));
return parent::getExtension($extension_id);
}
@@ -7,11 +7,11 @@
*
* <include:module name=Mainmenu wrap=Nav />
* <include:module name=Sidebar template=Sidebar wrap=div/>
- *<include:defer/>
- * <include:head/>
*/
defined('MOLAJO') or die; ?>
+<include:head/>
<include:module name=Pageheader/>
<include:message/>
<include:request/>
<include:module name=Pagefooter/>
+<include:defer/>
@@ -85,6 +85,7 @@ class Controller
'loadRowList',
'loadAssocList',
'loadObjectList',
+ 'getAssets',
'getMessages',
'none'
);
Oops, something went wrong.

0 comments on commit e270ed4

Please sign in to comment.