# pecl
Commands:
build Build an Extension From C Source
bundle Unpacks a Pecl Package
channel-add Add a Channel
channel-alias Specify an alias to a channel name
channel-delete Remove a Channel From the List
channel-discover Initialize a Channel from its server
channel-info Retrieve Information on a Channel
channel-login Connects and authenticates to remote channel server
channel-logout Logs out from the remote channel server
channel-update Update an Existing Channel
clear-cache Clear Web Services Cache
config-create Create a Default configuration file
config-get Show One Setting
config-help Show Information About Setting
config-set Change Setting
config-show Show All Settings
convert Convert a package.xml 1.0 to package.xml 2.0 format
cvsdiff Run a "cvs diff" for all files in a package
cvstag Set CVS Release Tag
download Download Package
download-all Downloads each available package from the default channel
info Display information about a package
install Install Package
list List Installed Packages In The Default Channel
list-all List All Packages
list-channels List Available Channels
list-files List Files In Installed Package
list-upgrades List Available Upgrades
login Connects and authenticates to remote server [Deprecated in favor of channel-login]
logout Logs out from the remote server [Deprecated in favor of channel-logout]
makerpm Builds an RPM spec file from a PEAR package
package Build Package
package-dependencies Show package dependencies
package-validate Validate Package Consistency
pickle Build PECL Package
remote-info Information About Remote Packages
remote-list List Remote Packages
run-scripts Run Post-Install Scripts bundled with a package
run-tests Run Regression Tests
search Search remote package database
shell-test Shell Script Test
sign Sign a package distribution file
svntag Set SVN Release Tag
uninstall Un-install Package
update-channels Update the Channel List
upgrade Upgrade Package
upgrade-all Upgrade All Packages [Deprecated in favor of calling upgrade with no parameters]
Usage: pecl [options] command [command-options] <parameters>
Type "pecl help options" to list all options.
Type "pecl help shortcuts" to list all command shortcuts.
Type "pecl help version" or "pecl version" to list version information.
Type "pecl help <command>" to get the help for the specified command.
Enabling the “sensio_framework_extra.router.annotations” configuration is deprecated since version 5.2. Set it to false and use the “Symfony\Component\Routing\Annotation\Route” annotation from Symfony itself
または、 bin/console コマンドによりキャッシュクリア(--env=prod or --env=dev)
# bin/console cache:clear --env=prod
bin/console コマンド一覧
# bin/console list
Symfony 3.4.49 (kernel: app, env: dev, debug: true)
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
-e, --env=ENV The Environment name. [default: "dev"]
--no-debug Switches off debug mode.
-v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
Available commands:
about Displays information about the current project
help Displays help for a command
list Lists commands
assets
assets:install Installs bundles web assets under a public directory
cache
cache:clear Clears the cache
cache:pool:clear Clears cache pools
cache:pool:prune Prunes cache pools
cache:warmup Warms up an empty cache
config
config:dump-reference Dumps the default configuration for an extension
debug
debug:autowiring Lists classes/interfaces you can use for autowiring
debug:config Dumps the current configuration for an extension
debug:container Displays current services for an application
debug:event-dispatcher Displays configured listeners for an application
debug:form Displays form type information
debug:router Displays current routes for an application
debug:swiftmailer Displays current mailers for an application
debug:tactician
debug:translation Displays translation messages information
debug:twig Shows a list of twig functions, filters, globals and tests
doctrine
doctrine:cache:clear-collection-region Clear a second-level cache collection region
doctrine:cache:clear-entity-region Clear a second-level cache entity region
doctrine:cache:clear-metadata Clears all metadata cache for an entity manager
doctrine:cache:clear-query Clears all query cache for an entity manager
doctrine:cache:clear-query-region Clear a second-level cache query region
doctrine:cache:clear-result Clears result cache for an entity manager
doctrine:cache:contains Check if a cache entry exists
doctrine:cache:delete Delete a cache entry
doctrine:cache:flush [doctrine:cache:clear] Flush a given cache
doctrine:cache:stats Get stats on a given cache provider
doctrine:database:create Creates the configured database
doctrine:database:drop Drops the configured database
doctrine:database:import Import SQL file(s) directly to Database.
doctrine:ensure-production-settings Verify that Doctrine is properly configured for a production environment
doctrine:generate:entities [generate:doctrine:entities] Generates entity classes and method stubs from your mapping information
doctrine:mapping:convert [orm:convert:mapping] Convert mapping information between supported formats
doctrine:mapping:import Imports mapping information from an existing database
doctrine:mapping:info
doctrine:query:dql Executes arbitrary DQL directly from the command line
doctrine:query:sql Executes arbitrary SQL directly from the command line.
doctrine:schema:create Executes (or dumps) the SQL needed to generate the database schema
doctrine:schema:drop Executes (or dumps) the SQL needed to drop the current database schema
doctrine:schema:update Executes (or dumps) the SQL needed to update the database schema to match the current mapping metadata
doctrine:schema:validate Validate the mapping files
fos
fos:js-routing:debug Displays currently exposed routes for an application
fos:js-routing:dump Dumps exposed routes to the filesystem
lint
lint:twig Lints a template and outputs encountered errors
lint:xliff Lints a XLIFF file and outputs encountered errors
lint:yaml Lints a file and outputs encountered errors
prestashop
prestashop:licenses:update Rewrite your licenses to be up-to-date
prestashop:linter:legacy-link Checks if _legacy_link is configured in BackOffice routes
prestashop:linter:naming-convention Checks if Back Office routes and controllers follow naming convention.
prestashop:linter:security-annotation Checks if Back Office route controllers has configured Security annotations.
prestashop:list:commands-and-queries Lists available CQRS commands and queries
prestashop:mail:generate Generate mail templates for a specified theme
prestashop:module Manage your modules via command line
prestashop:schema:update-without-foreign Update the database
prestashop:taxes:update-eu-tax-rule-groups Update EU Tax rule groups
prestashop:theme:enable Manage your themes via command line
prestashop:theme:export Create zip to distribute theme with its dependencies
prestashop:translation:find-duplicates Find duplicates of your translations
prestashop:update:configuration-file-hooks-listing Appends configuration file hooks list
prestashop:update:sql-upgrade-file-hooks-listing Adds sql to sql upgrade file which contains hook insert opeartion
router
router:match Helps debug routes by simulating a path info match
security
security:check Checks security issues in your project dependencies
security:encode-password Encodes a password.
server
server:log Starts a log server that displays logs in real time
server:run Runs a local web server
server:start Starts a local web server in the background
server:status Outputs the status of the local web server
server:stop Stops the local web server that was started with the server:start command
swiftmailer
swiftmailer:email:send Send simple email message
swiftmailer:spool:send Sends emails from the spool
translation
translation:update Updates the translation file
# bin/console prestashop:mail:generate --help
Usage:
prestashop:mail:generate [options] [--] <theme> <locale> [<coreOutputFolder>] [<modulesOutputFolder>]
Arguments:
theme Theme to use for mail templates.
locale Which locale to use for the templates.
coreOutputFolder Output folder to export core templates.
modulesOutputFolder Output folder to export modules templates (by default same as core).
Options:
-o, --overwrite[=OVERWRITE] Overwrite existing templates [default: false]
-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.
-v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
/**
* Url to the mail themes folder
*
* @return string
*/
public function getMailThemesUrl()
{
return $this->tools->getShopDomainSsl(true) . __PS_BASE_URI__ . $this->mailThemesUri;
}
This directory contains the configuration for the bundles and the framework.
It contains the following subdirectories:
/config: configuration files for database, parameters, services, etc.
/logs: execution logs
/Resources: different resources for the software, most notably the /translations subdirectory which contains translation resources for all the installed languages.
/test: reserved
This directory also includes the AppKernel.php file, which configures the Symfony application.
/controllers
Contains controllers – as in Model-View-Controller (or MVC), the software architecture used by PrestaShop. Each file controls a specific part of PrestaShop.
Controllers are separated in two directories:
/admin: contains legacy controllers for the Back Office
/front: contains controllers for the Front Office
/mails
Contains all HTML and text templates for e-mails sent by PrestaShop. Each language has its specific folder, where you can manually edit their content if you wish. PrestaShop contains a tool to edit your e-mails, located in the back office, in the Localization > Translation page.
Since 1.7.6 this directory also contains Mail themes.
/modules
Contains all of PrestaShop’s modules, each in its own folder. If you wish to definitely remove a module, it is better to uninstall it from the back office.
/src
Contains the new architecture files (Core, Adapter and PrestaShop Bundle). To learn more, see Understanding the “src” folder.
Core: contains business logic classes
Adapter: business logic classes that still depend on legacy framework (for instance: Context, Dispatcher or constants);
PrestaShopBundle: classes that acts as a glue between PrestaShop classes and Symfony
classes/State.php County ---> Country, Counties ---> Countries
/**
* Has Countries.
*
* @param int $idState
*
* @return int
*/
public static function hasCountries($idState)
{
return count(Country::getCountries((int) $idState));
}
Tables which contain translations must end with the _lang suffix. For instance, ps_product_lang contains all the translations for the ps_product table.
Use the id_lang field to store the language associated with a record.