CLI¶
Phspark CLI (Command Line Interface)
Command List¶
php cli list
Add/Remove Permissions¶
Syntax: php cli app:permission location type code --action=add/remove
php cli app:permission backend module ncommerce --action=add
php cli app:permission backend module ncommerce --action=remove
Breathing & Breathing Report¶
php cli app:breathing [backend]
php cli app:breathing-report [backend] [module] [customer] --domain=[192.168.0.1]
Sync UID¶
Sync Unique ID for a table, where uid field is available.
php cli app:sync-uid --force
[The force flag will regenerate all the UIDs]
Sync Debug Key¶
Sync Debug Key
php cli app:debug --force
[The force flag will regenerate the debug key]
Shhinx Doc (General) Generation¶
php cli app:doc sourceDir destinationDir
php cli app:doc location type code
# Example:
.. code-block:: html
php cli app:doc "d:/www/practice/phspark/utils/doc" "d:/www/practice/phspark/doc/"
php cli app:doc backend module accounting
php cli app:doc "c:/www/phspark/backend/extension/module/marketplace/doc" "d:/www/phspark/documentation/extension/module/marketplace"
PHP Documentation (API) Generation¶
Make sure that the destination is exists.
php cli app:api-doc location type code
# Example:
.. code-block:: html
php cli app:api-doc backend module accounting
Publish assets. i.e. js, css, images etc¶
Syntax: php cli app:publish-asset location type code
php cli app:publish-asset backend module accounting
Create zip file of an extension¶
Syntax: php cli app:publish-asset location type code file_name
php cli app:extension-package backend module accounting accounting101
php cli app:extension-package frontend module marketplace
php cli app:extension-package backend widget chart
Migration of Database Table¶
Syntax: php cli app:migrate location type code --action=up/down
php cli app:migrate backend module accounting --action=up
php cli app:migrate backend module accounting --action=down
Extension Installation¶
Put extensions files under backend/extension directory and run this command. It will add a record into database to initiate extension installation process.
php cli app:extension-add location type code name sort_order required
php cli app:extension-add backend module accounting 0 0 [explain: php cli app:extension-add location type code sort_order required]
php cli app:extension-add backend widget test 0 0
Extension Update ### Update sort-order and required flag —————-
php cli app:extension-update location type code --action=[i.e. status, sort_order, require_flag] --value=[0, 1] [explain: php cli app:extension-update backend module reset --action=status --value=0]
Database Backup¶
php cli app:backup all [backup all database tables]
php cli app:backup backend [take all backend extension backup]
php cli app:backup backend module accounting [explain: php cli app:backup location type code]
Clean The backup files¶
php cli app:clean backup [clear backup files]
php cli app:backup backend module accounting [explain: php cli app:backup location type code]
Others¶
php cli app:seo-url-list
php cli app:event-list
php cli app:demo-preparation
[Do you want to enable/disable demo preparation mode? press y=enable or n=disable :: n]
php cli app:maintenance-mode
[Do you want to enable/disable maintenance mode? press y=enable or n=disable :: n]
*** In login as admin then maintenance mode will not work!!!