LoginSignup
0

More than 5 years have passed since last update.

eZ Publish のコンソールコマンド eep

Last updated at Posted at 2016-12-25

eep

https://github.com/mugoweb/eep
WordPress には wp-cli が、Drupal には Drush や Drupal Console がありますが、 eZ Publish にも eep というコンソールコマンドツールがあります。

カナダと米国で活動する Mugo Web という企業によって開発されています。

インストール

cd && curl -LSs https://github.com/mugoweb/eep/archive/master.tar.gz | tar zx && mv eep-master eep
chmod +x ~/eep/eep.php && ln -s -T ~/eep/eep.php /usr/bin/eep

初期設定

cd /var/www/ezpublish5
eep use ezroot .

ここでは eZ Publish がインストールされているディレクトリーを /var/www/ezpublish5 としています。

オブジェクト情報の取得

eep contentobject info <オブジェクトID>
入力例
eep co info 4
出力例
 +-----------------+----------------------------------+
 I contentobject id [4]                               |
 +-----------------+----------------------------------+
 I             key | value                            |
 +-----------------+----------------------------------+
 |            Name | Users                            |
 | CurrentLanguage | jpn-JP                           |
 | ClassIdentifier | user_group                       |
 |       SectionID | 2                                |
 |         OwnerID | 14                               |
 |       Published | 1033917596 (2002-10-07 00:19:56) |
 |        Modified | 1033917596 (2002-10-07 00:19:56) |
 |  CurrentVersion | 1                                |
 |          Status | 1                                |
 |        RemoteID | f5c88a2209584891056f987fd965b0ba |
 |      MainNodeID | 5                                |
 |                 |                                  |
 |  All locations: |                                  |
 |           /1/5/ | users                            |
 +-----------------+----------------------------------+

オブジェクトのデータマップ取得

eep contentobject datamap <オブジェクトID>
入力例
eep co datamap 4
出力例
 +-------------+----+----------------+------------+---------+-----------+------------+---------------+------+
 I contentobject datamap id [4]                                                                             |
 +-------------+----+----------------+------------+---------+-----------+------------+---------------+------+
 I  identifier | ID | DataTypeString |   DataText | DataInt | DataFloat | SortKeyInt | SortKeyString | Ver. |
 +-------------+----+----------------+------------+---------+-----------+------------+---------------+------+
 |        name |  8 |       ezstring |      Users |         |           |          0 |               |    1 |
 | description |  7 |       ezstring | Main group |         |           |          0 |               |    1 |
 +-------------+----+----------------+------------+---------+-----------+------------+---------------+------+

属性値の更新

eep attribute fromstring <オブジェクトID> <属性識別子> <属性値>

いわゆる属性(フィールド)の値を変更したい場合に実行します。
attributeat と省略できます。

移動

eep contentnode move <ノードID> <移動先親ノードID>

contentnodecn と省略できます。

Symfony Console

eZ Publish 5 からは Symfony を採用しているため、 Symfony Console が利用できます。

キャッシュクリア

php ezpublish/console cache:clear

cache:clearc:c と省略できます。
また、eZ Platform の場合は ezpublish/console ではなく app/console になります。

新規バンドル生成

php ezpublish/console generate:bundle

オートロード再生成

php ezpublish/console ezpublish:legacy:script bin/php/ezpgenerateautoloads.php

レガシーキャッシュの破棄

php ezpublish/console ezpublish:legacy:script bin/php/ezcache.php --legacy-help

レガシースクリプトの実行

php ezpublish/console ezpublish:legacy:script runcronjobs.php frequent

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0