dev-master
9999999-dev https://github.com/p0lym0rphik/cakephp-metabehaviorCakePHP MetaBehavior Plugin, dealing with additional datas
GPL-2.0
The Requires
cakephp metadatas metabehavior extradata
CakePHP MetaBehavior Plugin, dealing with additional datas
CakePHP Metabehavior is a meta data Behavior for CakePHP 2. This behavior allows you to store, retrieve and search for metadata about any record for any model within your database., (*3)
Add the folder on your app/Plugin directory., (*4)
Make sure that the Plugin is loaded (check your bootstrap configuration)., (*5)
Run the following commands:, (*6)
cd /path/to/installation/ app/Console/cake schema create MetaBehavior.metas
class MyModel extends Model { public $actsAs = array('Meta'); }
// Just set meta key on the primary request model $savedDatas = $this->request->data; $savedDatas['MyModel']['foo'] = 'bar'; $this->MyModel->save($savedDatas);
// Just launch a find and datas are in the primary model. $model = $this->MyModel->findByid(1); return array( 'MyModel' => array( 'id' => 1, 'foo' => 'bar' ) )
$this->MyModel->find('all',array( 'conditions' => array( 'MyModel.foo =' => 'bar' ) ));
CakePHP MetaBehavior plugin Copyright (C) 2014 Fabien Moreau, (*7)
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version., (*8)
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details., (*9)
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA., (*10)
CakePHP MetaBehavior Plugin, dealing with additional datas
GPL-2.0
cakephp metadatas metabehavior extradata