mugoweb/eep-bundle

一个支持开发者在使用 eZ Platform/Ibexa DXP 的 Symfony 命令包

安装: 24

依赖: 0

建议者: 0

安全: 0

星标: 4

关注者: 7

分叉: 1

开放问题: 0

类型:symfony-bundle

dev-master 2024-04-04 05:56 UTC

This package is auto-updated.

Last update: 2024-09-04 06:57:32 UTC


README

一个支持开发者在使用 eZ Platform/Ibexa DXP 的 Symfony 命令包

工作中

目前针对 eZ Platform 2.5 LTS,Ibexa DXP 3.3 LTS 及 4.6 LTS 进行开发

master : targets Ibexa DXP 4.6 LTS
2.5-lts: targets eZPlatform 2.5 LTS
3.3-lts: targets Ibexa DXP 3.3 LTS
4.6-lts: targets Ibexa DXP 4.6 LTS

(archived)   
4.2    : targets Ibexa DXP 4.2

欢迎提交错误报告和功能建议。

安装

composer require mugoweb/eep-bundle:dev-master
请检查 CMS master 使用的版本,或使用特定版本的 dev-2.5-ltsdev-3.3-ltsdev-4.6-lts

之后,您需要启用此包。

eZ Platform

更新 app/AppKernel.php
为了在所有环境中启用包,将 new MugoWeb\Eep\Bundle\MugoWebEepBundle(), 添加到 $bundles 数组中。

Ibexa DXP

更新 config/bundles.php
为了在所有环境中启用包,将 MugoWeb\Eep\Bundle\MugoWebEepBundle::class => ['all' => true], 添加到数组中。

特性

eep                          Ease eZ Platform/Ibexa DXP development (placeholder)

eep:cache:purge              [eep:ca:purge] Purge cache by tag(s)

eep:content:create           [eep:co:create] Create content at location
eep:content:delete           [eep:co:delete] Delete content
eep:content:draftcreate      [eep:co:draftcreate] Create draft from content
eep:content:draftdelete      [eep:co:draftdelete] Deletes content draft version
eep:content:draftlist        [eep:co:draftlist] Returns content draft list
eep:content:draftpublish     [eep:co:draftpublish] Publish content draft
eep:content:info             [eep:co:info] Returns content information
eep:content:listfields       [eep:co:listfields] Returns content field list
eep:content:listversions     [eep:co:listversions] Returns content version list
eep:content:location         [eep:co:lo|eep:co:location] Returns main location id by content id
eep:content:related          [eep:co:related] Returns related content information
eep:content:republish        [eep:co:republish] Re-publishes content by id
eep:content:reverserelated   [eep:co:reverserelated] Returns reverse related content information
eep:content:update           [eep:co:update] Update content
eep:content:updatemeta       [eep:co:updatemeta] Update content meta data
eep:content:versiondelete    [eep:co:versiondelete] Deletes content version
eep:content:versioninfo      [eep:co:versioninfo] Returns content version information

eep:contentfield:fromstring  [eep:cf:fromstring] Set content field value from JSON string
eep:contentfield:info        [eep:cf:info] Returns content field information
eep:contentfield:tostring    [eep:cf:tostring] Returns content field value as JSON string

eep:contenttype:info         [eep:ct:info] Returns content type information
eep:contenttype:list         [eep:ct:list] Returns content type list
eep:contenttype:listcontent  [eep:ct:listcontent] Returns content information by content type identifier
eep:contenttype:listfields   [eep:ct:listfields] Returns content type field list

eep:contenttypefield:info    [eep:ctf:info] Returns content type field information

eep:location:content         [eep:lo:co|eep:lo:content] Returns content id by location id
eep:location:copy            [eep:lo:copy] Copy source location to be child of target location
eep:location:delete          [eep:lo:delete] Delete location subtree
eep:location:hide            [eep:lo:hide] Hide location subtree
eep:location:info            [eep:lo:info] Returns location information
eep:location:move            [eep:lo:move] Move source location to be child of target location
eep:location:reveal          [eep:lo:reveal] Reveal location subtree
eep:location:subtree         [eep:lo:subtree] Returns subtree information
eep:location:swap            [eep:lo:swap] Swap source- and target locations

eep:search:search            [eep:sr:search] Returns search result information

eep:section:assigncontent    [eep:se:assigncontent] Assign content to section
eep:section:list             [eep:se:list] Returns section list
eep:section:listcontent      [eep:se:listcontent] Returns content list by section identifier

eep:user:info                [eep:us:info] Returns user information
eep:user:list                [eep:us:list] Returns user list

Symfony 的控制台帮助 -h 提供有关命令参数和输入/输出格式的更多信息。
例如。

$ php bin/console eep:contenttype:listcontent -h

Usage:
  eep:contenttype:listcontent [options] [--] <content-type-identifier>
  eep:ct:listcontent

Arguments:
  content-type-identifier        Content type identifier

Options:
  -u, --user-id[=USER-ID]        User id for content operations [default: 14]
      --offset[=OFFSET]          Offset
      --limit[=LIMIT]            Limit
  -h, --help                     Display this help message
  -q, --quiet                    Do not output any message
  -V, --version                  Display this application version
      --ansi                     Force ANSI output
      --no-ansi                  Disable ANSI output
  -n, --no-interaction           Do not ask any interactive question
  -e, --env=ENV                  The Environment name. [default: "dev"]
      --no-debug                 Switches off debug mode.
      --siteaccess[=SITEACCESS]  SiteAccess to use for operations. If not provided, default siteaccess will be used
  -v|vv|vvv, --verbose           Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

示例输出

php bin/console eep:contenttype:listcontent folder --limit=6

+-----------+----------------+-----------+------------------+----------------------------------+---------------------+
I eep:contenttype:listcontent [folder]                                                         I Results: 1 - 6 / 12 I
+-----------+----------------+-----------+------------------+----------------------------------+---------------------+
I contentId I mainLocationId I sectionId I currentVersionNo I remoteId                         I name                I
+-----------+----------------+-----------+------------------+----------------------------------+---------------------+
| 1         | 2              | 1         | 9                | 9459d3c29e15006e45197295722c7ade | eZ Platform         |
| 41        | 43             | 3         | 1                | a6e35cbcb7cd6ae4b691f3eee30cd262 | Media               |
| 45        | 48             | 4         | 1                | 241d538ce310074e602f29f49e44e938 | Setup               |
| 49        | 51             | 3         | 1                | e7ff633c6b8e0fd3531e74c6e712bead | Images              |
| 50        | 52             | 3         | 1                | 732a5acd01b51a6fe6eab448ad4138a9 | Files               |
| 51        | 53             | 3         | 1                | 09082deb98662a104f325aaa8c4933d3 | Multimedia          |
+-----------+----------------+-----------+------------------+----------------------------------+---------------------+

注意:支持 --hide-columns 选项的命令允许通过隐藏一个或多个列来修改结果表的显示。

eep 及其朋友:awk、xargs、grep...

当 eep 与其他命令行工具(如 awk、xargs、grep 等)结合使用时,特别出色。

由于数据表格式的方式,标题和数据列使用不同的列分隔符,它们可以很容易地解析和处理。
例如。
仅返回文件夹对象的 content ids。

php bin/console eep:contenttype:listcontent folder --limit=6 | awk '$1=="|" {print $2}'

1
41
45
49
50
51

为这些 content ids 返回位置 ids。

php bin/console eep:contenttype:listcontent folder --limit=6 | awk '$1=="|" {print $2}' > my_content_ids.txt

cat my_content_ids.txt | xargs -ICONTENTID php bin/console eep:content:location CONTENTID

2
43
48
51
52
53

(也可以通过省略文件输出/输入步骤将其合并为单个管道)