code/Controller.php
protected function findModule()
	{
		if($this->isGreenPage()) {
			$moduleName = $this->DesignModule;
			if($moduleName) {
				return Green::inst()->getDesignModule($moduleName);
			}
		}

		$url = $this->request->getURL();
		foreach(Green::inst()->getDesignModules() as $module) {
			if((string) $module->getConfiguration()->public_url == $url) {
				return $module;
			}
		}

		return false;
	}
protected function findModule()
	{
		if($this->isGreenPage()) {
			$moduleName = $this->DesignModule;
			if($moduleName) {
				return Green::inst()->getDesignModule($moduleName);
			}
		}

		$url = $this->request->getURL();
		foreach(Green::inst()->getDesignModules() as $module) {
			if((string) $module->getConfiguration()->public_url == $url) {
				return $module;
			}
		}

		return false;
	}
protected function findModule ( ) { if ( $ this -> isGreenPage ( ) ) { $ moduleName = $ this -> DesignModule ; if ( $ moduleName ) { return Green :: inst ( ) -> getDesignModule ( $ moduleName ) ; } } $ url = $ this -> request -> getURL ( ) ; foreach ( Green :: inst ( ) -> getDesignModules ( ) as $ module ) { if ( ( string ) $ module -> getConfiguration ( ) -> public_url == $ url ) { return $ module ; } } return false ; }
Finds the DesignModule object, whether through the attached
data record or through the public_url match

@return DesignModule|bool
Finds the DesignModule object whether through the attached data record or through the public_url match