Tutorial 2x XF 2 Command Line Functions - Chức năng dòng lệnh cho XenForo 2

PVS

Super Moderator
Thành viên BQT
Tham gia
28/02/2015
Bài viết
16,828
Được Like
12,687
XF 2 Command Line Functions - Chức năng dòng lệnh cho XenForo 2

Mã:
Console Tool

php cmd.php

Usage:

  command [options] [arguments]



Options:

  -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

  -v|vv|vvv, --verbose  Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug



Available commands:

  help                                  Displays help for a command

  list                                  Lists commands

xf

  php cmd.php xf:addon-disable                      Disables the specified add-on. If no add-on ID is provided, all enabled add-ons will be disabled.

  php cmd.php xf:addon-enable                       Enable the specified add-on. If no add-on ID is provided, all disabled add-ons will be enabled.

  php cmd.php xf:addon-install                      Installs the specified add-on

  php cmd.php xf:addon-rebuild                      Rebuilds the specified add-on data.

  php cmd.php xf:addon-sub-action                   Runs a add-on sub-action in a separate process. Do not run directly!

  php cmd.php xf:addon-uninstall                    Uninstalls the specified add-on

  php cmd.php xf:addon-upgrade                      Upgrades the specified add-on

  php cmd.php xf:convert-utf8mb4                    Converts XenForo tables to utf8mb4

  php cmd.php xf:file-check                         Performs a file health check

  php cmd.php xf:import                             Executes an import configured via the control panel

  php cmd.php xf:install                            Installs XenForo

  php cmd.php xf:rebuild-master-data                Rebuilds the core XF master data.

  php cmd.php xf:upgrade                            Upgrades XenForo

xf-addon

  php cmd.php xf-addon:build-release                Performs an export of the current XML data and saves a ZIP file to _releases

  php cmd.php xf-addon:bump-version                 Bumps the version of the specified add-on

  php cmd.php xf-addon:create                       Creates an XF add-on and writes out the basic addon.json file.

  php cmd.php xf-addon:disable                      Disables the specified add-on. If no add-on ID is provided, all enabled add-ons will be disabled.

  php cmd.php xf-addon:enable                       Enable the specified add-on. If no add-on ID is provided, all disabled add-ons will be enabled.

  php cmd.php xf-addon:export                       Exports the XML files for an add-on

  php cmd.php xf-addon:install                      Installs the specified add-on

  php cmd.php xf-addon:install-step                 Runs a specific step from the specified add-on Setup class.

  php cmd.php xf-addon:rebuild                      Rebuilds the specified add-on data.

  php cmd.php xf-addon:sync-json                    Syncs the contents of the add-on JSON file to the database, updating the title, version and JSON hash as necessary

  php cmd.php xf-addon:uninstall                    Uninstalls the specified add-on

  php cmd.php xf-addon:uninstall-step               Runs a specific step from the specified add-on Setup class.

  php cmd.php xf-addon:upgrade                      Upgrades the specified add-on

  php cmd.php xf-addon:upgrade-step                 Runs a specific step from the specified add-on Setup class.

  php cmd.php xf-addon:validate-json                Validates the contents of the add-on JSON file to ensure all of the required values exist and are of the correct type.

xf-designer

  php cmd.php xf-designer:disable                   Disables designer mode on the specified style

  php cmd.php xf-designer:enable                    Enables designer mode on the specified style

  php cmd.php xf-designer:export                    Exports modified templates from the database to the file system for the specified designer mode.

  php cmd.php xf-designer:export-style-properties   Exports style properties for the specified designer mode ID.

  php cmd.php xf-designer:export-templates          Exports templates for the specified designer mode ID.

  php cmd.php xf-designer:import                    Imports designer files from the file system for the specified designer mode.

  php cmd.php xf-designer:import-style-properties   Imports style properties from specified designer mode files

  php cmd.php xf-designer:import-templates          Imports templates from specified designer mode files

  php cmd.php xf-designer:rebuild-metadata          Rebuilds metadata hashes based on file system content

  php cmd.php xf-designer:revert-template           Reverts the specified template.

  php cmd.php xf-designer:sync-templates            Syncs the contents of the template files to the DB for the specified designer mode, applying version number updates

  php cmd.php xf-designer:touch-template            Marks the specified template as modified in the specified style and exports it.

xf-dev

  php cmd.php xf-dev:class-lint                     Checks that all classes can be loaded without conflicts

  php cmd.php xf-dev:compare-schema                 Compares database schemas for consequential differences

  php cmd.php xf-dev:entity-class-properties        Applies class properties to type hint columns, getters and relations

  php cmd.php xf-dev:export                         Exports all data to development files

  php cmd.php xf-dev:export-admin-navigation        Exports Admin navigation to development files

  php cmd.php xf-dev:export-admin-permissions       Exports Admin permissions to development files

  php cmd.php xf-dev:export-advertising-positions   Exports advertising positions to development files

  php cmd.php xf-dev:export-bb-code-media-sites     Exports bb code media sites to development files

  php cmd.php xf-dev:export-bb-codes                Exports bb codes to development files

  php cmd.php xf-dev:export-class-extensions        Exports class extensions to development files

  php cmd.php xf-dev:export-code-event-listeners    Exports code event listeners to development files

  php cmd.php xf-dev:export-code-events             Exports code events to development files

  php cmd.php xf-dev:export-content-types           Exports content types to development files

  php cmd.php xf-dev:export-cron-entries            Exports cron entries to development files

  php cmd.php xf-dev:export-help-pages              Exports help pages to development files

  php cmd.php xf-dev:export-member-stats            Exports member stats to development files

  php cmd.php xf-dev:export-navigation              Exports Navigation to development files

  php cmd.php xf-dev:export-options                 Exports options to development files

  php cmd.php xf-dev:export-permissions             Exports Permissions to development files

  php cmd.php xf-dev:export-phrases                 Exports phrases to development files

  php cmd.php xf-dev:export-routes                  Exports Routes to development files

  php cmd.php xf-dev:export-style-properties        Exports style properties to development files

  php cmd.php xf-dev:export-template-modifications  Exports template modifications to development files

  php cmd.php xf-dev:export-templates               Exports templates to development files

  php cmd.php xf-dev:export-widget-definitions      Exports widget definitions to development files

  php cmd.php xf-dev:export-widget-positions        Exports widget positions to development files

  php cmd.php xf-dev:generate-entity-dw             Generates an entity from a legacy DataWriter

  php cmd.php xf-dev:generate-phpstorm-meta         Generates a .phpstorm.meta.php file for dynamic return type hinting

  php cmd.php xf-dev:generate-schema-entity         Generates schema code from an entity

  php cmd.php xf-dev:import                         Imports all data from development files

  php cmd.php xf-dev:import-admin-navigation        Imports admin navigation from development files

  php cmd.php xf-dev:import-admin-permissions       Imports admin permissions from development files

  php cmd.php xf-dev:import-advertising-positions   Imports advertising positions from development files

  php cmd.php xf-dev:import-bb-code-media-sites     Imports bb code media sites from development files

  php cmd.php xf-dev:import-bb-codes                Imports bb codes from development files

  php cmd.php xf-dev:import-class-extensions        Imports class extensions from development files

  php cmd.php xf-dev:import-code-event-listeners    Imports code event listeners from development files

  php cmd.php xf-dev:import-code-events             Imports code events from development files

  php cmd.php xf-dev:import-content-types           Imports content types from development files

  php cmd.php xf-dev:import-cron-entries            Imports cron entries from development files

  php cmd.php xf-dev:import-help-pages              Imports help pages from development files

  php cmd.php xf-dev:import-member-stats            Imports member stats from development files

  php cmd.php xf-dev:import-navigation              Imports navigation from development files

  php cmd.php xf-dev:import-options                 Imports options from development files

  php cmd.php xf-dev:import-permissions             Imports permissions from development files

  php cmd.php xf-dev:import-phrases                 Imports phrases from development files

  php cmd.php xf-dev:import-routes                  Imports routes from development files

  php cmd.php xf-dev:import-style-properties        Imports style properties from development files

  php cmd.php xf-dev:import-template-modifications  Imports template modifications from development files

  php cmd.php xf-dev:import-templates               Imports templates from development files

  php cmd.php xf-dev:import-widget-definitions      Imports widget definitions from development files

  php cmd.php xf-dev:import-widget-positions        Imports widget positions from development files

  php cmd.php xf-dev:metadata-clean                 Cleans up the metadata JSON files and removes missing entries

  php cmd.php xf-dev:rebuild-caches                 Rebuilds various caches

  php cmd.php xf-dev:rebuild-metadata               Rebuilds metadata hashes based on file system content

  php cmd.php xf-dev:recompile                      Recompiles all template/phrase data

  php cmd.php xf-dev:recompile-phrases              Recompiles phrases

  php cmd.php xf-dev:recompile-style-properties     Recompiles style properties

  php cmd.php xf-dev:recompile-templates            Recompiles parsed templates

  php cmd.php xf-dev:sync-templates                 Syncs the contents of the template files to the DB, applying version number updates

  php cmd.php xf-dev:touch-template                 Updates the version number of the specified template

  php cmd.php xf-dev:update-version                 Updates the XF version to the same version as in the XF files.

  php cmd.php xf-dev:upgrade-step                   Runs a specific upgrade step from a specified upgrade class.

xf-rebuild

  php cmd.php xf-rebuild:forums                     Rebuilds forum counters.

  php cmd.php xf-rebuild:search                     Rebuilds the search index.

  php cmd.php xf-rebuild:threads                    Rebuilds thread counters.

  php cmd.php xf-rebuild:users                      Rebuilds user counters and caches.



Usage:

  list [options] [--] [<namespace>]



Arguments:

  namespace            The namespace name



Options:

      --xml            To output list as XML

      --raw            To output raw command list

      --format=FORMAT  The output format (txt, xml, json, or md) [default: "txt"]



Help:

  The list command lists all commands:



    php cmd.php list



  You can also display the commands for a specific namespace:



    php cmd.php list test



  You can also output the information in other formats by using the --format option:



    php cmd.php list --format=xml



  It's also possible to get raw list of commands (useful for embedding command runner):



    php cmd.php list --raw

Chúc các bạn thành công.


Nguồn: xenforo.com​
 

Hướng dẫn sử dụng

XenForo 1 XenForo 2
Translate by PVS

Dịch vụ XenForo của VNXF

Mr. Tuấn

Mobile/Zalo: 0988 488 096

Telegram: bluekpro

Email: [email protected]

Nhà Tài Trợ

Mút Xốp Không Gian
pallet Thịnh Phát
Top Bottom