indexController.php wygląda tak:
class IndexController extends Zend_Controller_Action {
function init() {
$this->view->baseUrl = $this->_request->getBaseUrl();
Zend_Loader::loadClass('Configuration');
Zend_Loader::loadClass('Projects');
self::countProjects();
}
function indexAction() {
$configuration = new Configuration();
$this->view->configurations = $configuration->fetchAll("id='1'");
$this->view->news = $configuration->fetchAll("id <> '1' AND id <> '2'");
self::countProjects();
}
function countProjects($region = null){
$project = new Projects();
$this->view->poland_concepts = count($project->fetchAll($project->select()->where('STATUS = "1"'))); $this->view->poland_projects = count($project->fetchAll($project->select()->where('STATUS = "2"')));
if($region){
$this->view->region_concepts = count($project->fetchAll($project->select()->where('REGION_ID = "'.$region.'" AND STATUS = "1"'))); $this->view->region_projects = count($project->fetchAll($project->select()->where('REGION_ID = "'.$region.'" AND STATUS = "2"'))); }
...
}
...
helpController.php
class helpController extends Zend_Controller_Action {
function init() {
$this->view->baseUrl = $this->_request->getBaseUrl();
Zend_Loader::loadClass('Help');
}
function indexAction() {
$this->view->title = "help";
$article = new Help();
$this->view->articles = $article->fetchAll();
}
function addAction(){
$this->view->title = "Artykuły";
if ($this->_request->isPost()) {
Zend_Loader::loadClass('Zend_Filter_StripTags');
$filter = new Zend_Filter_StripTags();
//itd. zupełnie inne akcje niż w indexController.php
...
a chodzi mi o wartości te: $this->view->poland_concepts itd.(jest tego dużo) w indexController
a to prawidłowa str. katalogow
controller
indexController.php
helpController.php
views
scripts
index
index.phtml
help
help.phtml
poprostu chciałbym mieć w help.phtml wartości z kontrolera indexContorller.php z funkcji np countProjects();