xlith / payday
提供全年剩余的工资和奖金发放日期。
v0.0.1
2022-02-28 23:46 UTC
Requires
- ext-json: *
- drush/drush: ^11.0
- nesbot/carbon: ^2.57
README
这是一个小型的Drupal模块,用于帮助一家虚构公司确定其销售部门需要支付工资的日期。
该模块与Drush集成,并创建了一个可以通过终端调用的新drush命令。
- 该模块高度依赖于Carbon库。
- 关于业务逻辑,请参阅位于\Drupal\payday\Services\Payday的服务类。
- 最后,代码通过注释和DocBlocks进行文档记录。如果在任何阶段感到困惑,请随时提问。
需求
- Drupal 9
- drush
- php 7.3
安装
$ composer require xlith/payday $ drush pm-enable payday
使用
计划
Generate payday schedule until the end of this year.
Examples:
drush payday:schedule schedule.csv This will create the csv data and write it in a file named schedule.csv.
drush payday:schedule This will create a csv data and output to the stdout.
Arguments:
[filename] Filename for CSV file. (Write including the file extension.) If this parameter is omitted output will be stdout.
Aliases: pds
信息
Outputs info about the payday module.
Examples:
drush payday:info Outputs info about the payday module.
Options:
--format=FORMAT Format the result data. Available formats: csv,json,list,null,php,print-r,sections,string,table,tsv,var_dump,var_export,xml,yaml [default: yaml]
--fields=FIELDS Limit output to only the listed elements. Name top-level elements by key, e.g. "--fields=name,date", or use dot notation to select a nested element, e.g. "--fields=a.b.c as example".
--field=FIELD Select just one field, and force format to *string*.
Aliases: pdi
测试
为了运行单元测试,模块必须安装在Drupal实例中,并且此特定实例必须相应设置。请参阅Drupal单元测试指南以获取更多信息。
phpunit --configuration phpunit.xml modules/payday/tests