cakephp 2.x plugin not working in cakephp 3.x -


i have develope 1 plugin in cakephp 2.x , working fine managing basic configuration y website have make following things , below code

in appcontroller

public $uses = array(     'configuration.configuration', );   public function beforefilter() {         $this->configuration->load();  } 

after in plugin's model have create function

function load(){     $settings = $this->find('all');     foreach ($settings $variable){       configure::write("{$variable['configuration']['name']}",$variable['configuration']['value']);     } } 

then in main admin login file using configuration

<?php       echo $this->html->link($this->html->image(configure::read('site.logo'),array('alt' => 'logo','title'=>configure::read('site.title'),'style'=>'max-width:148px;max-height:33px;')),array('controller'=>'users','action' => 'login','plugin'=>false), array('escape'=>false));  ?> 

its working fine when using process cakephp 3.x whoing error

error: class 'configure' not found file e:\xampp\htdocs\cakephp\src\template\layout\login.ctp line: 67  

plesae tell me how can solve , problem

yes, cakephp 3 comes many drastic changes in file structuare , name space usage. plugin developed in 2.x not work in 3.x

for must have refer migration guide document. http://book.cakephp.org/3.0/en/appendices/3-0-migration-guide.html

also cakephp provides upgrade tool you. https://github.com/cakephp/upgrade

thanks


Comments

Popular posts from this blog

magento2 - Magento 2 admin grid add filter to collection -

Android volley - avoid multiple requests of the same kind to the server? -

Combining PHP Registration and Login into one class with multiple functions in one PHP file -