DataSource for eZ Publish in CakePHP
Lighting Talk about Make a DataSource for eZ Publish ,
in the 5th CakePHP@Tokyo.
»
eZ Publish 4.3.0
CakePHP 1.3.0
準備
eZ本体をDownload
Install
Cake本体をDownload
ファイル配置
設計
eZの開発をCakePHPに例えてみる
Class 設計
Books
id
title
detail
管理画面からデータ投入
DB Table 設計
Books
id
title
detail
SQLでデータ投入
データ
投入
Nodeという概念
親Nodeを選び
Classを選び
Nodeを作成
SQLで投入
アーキテクチャ
C
v
M
override.ini.append.php
urlからnoteとviewを特定
siteaccess.ini.append.php
独自extension設定
Operator
templateの拡張機能
CakePHPで言えばHelper
実装不要
作業中心
設定ファイルを書く
C
V
M
DataSource
for eZ
eZ Template言語で実装
Smartyに似てる
eZ Publishの話
エンタープライズCMS
http://www.elle.fr/elle
日本での実績
http://www.shinshu-liveon.jp/
その他、大手出版社、デジタル系出版社、ネット系証券会社などなどの事例もございます。
世界での実績
http://vpf.mit.edu/
http://vlada.hr/
http://ez.no/customers/case_studies
see more in
データ管理専用
CMSだけではない
会員サイト機能
外部連携をもっと簡単に
サービスをもっと自由に
Demo
第5回CakePHP@tokyo
あのCMS「eZ Publish」をCakePHPのModelにしちゃう
Make a DataSource for eZ Publish
bennylee (@leebenny)
株式会社ミツエーリンクス所属
Webが好き!
Agenda
雑談/自己紹介
eZ Publishの話
eZの開発をCakePHPに例えてみる
DataSource for eZの仕組
Demo
1分間
1分間
3分間
2分間
3分間
今はここ。
public function index() {
$this->paginate = array(
'conditions'=>array('_ezurl'=>'mybooks'),
'limit'=>2,
'order'=>array('node_id',false),
);
$childs = $this->paginate();
$this->set('books',$childs);
}
public function view($id) {
$childs = $this->Book->find("all",array(
'conditions'=>array('_ezurl'=>'mybooks/'.$id),
'target'=>'self',
));
$this->set('book',$childs);
}
public function add() {
if (!empty($this->data)) {
$save_data = $this->data;
$save_data['Book']['_ezurl'] = 'mybooks';
if ($this->Book->save($save_data)) {
$this->flash('Your post has been saved.','/books');
}
}
}
public function delete($id) {
$this->Book->eZdel('mybooks/'.$id);
$this->flash('The book with id: '.$id.' has been deleted.', '/books');
}
public function edit($id = null) {
if (empty($this->data)) {
$this->data = $this->Book->find("all",array(
'conditions'=>array('_ezurl'=>'mybooks/'.$id),
'target'=>'self',
));
} else {
if ($this->Book->eZupdate('mybooks/'.$id,$this->data['Book'])) {
$this->flash('Your book has been updated.','/books');
}
}
}
BooksController
Class
Node1
Node2
(books)
(bookA)
(bookB)
ezurl: /mybooks/1
ezurl: /mybooks/2
eZのAPIがすごい!
eZのAPIを利用
eZ
books
id
title
detail
Class
ezurl(node達の配置場所)
/mybooks/*
CakePHP
(index.php)
(webapp.php)
一覧(paginate使用)
/webapp.php/books/
新規
/webapp.php/books/add/
編集
/webapp.php/books/edit/
削除
/webapp.php/books/delete/(id)
nodeのパス、mybooksは親node
すてべのデータは
nodeで表現する
Operatorの実装もeZのAPIを使用
CakePHPで実装したOperator
eZ Publish講座やってます!
http://www.mitsue.co.jp/product/ez_training/quick_start.html
詳細はこちらをご覧ください
Githubで公開中ver0.1
http://github.com/leebenny/CakePHP-DataSource-for-eZ-Publish
ご清聴有り難うございました!Popular presentations
Powerpoint Man
David Oliveira on
This Prezi tutorial aims to help people on how they can be more persuasive and more communicative with their presentations.
More popular prezis in Explore>