✏️ 正在编辑: AutomatizacaoForm.php
路径:
/srv/systems_dir/yuppiecred/application/Modules/Automatizacao/Form/AutomatizacaoForm.php
提示:
您可以编辑任何文件(包括二进制文件),但请注意不当修改可能导致文件损坏。
<?php namespace Modules\Automatizacao\Form; use Modules\Automatizacao\Dto\AutomatizacaoDto; use Modules\Automatizacao\Service\AutomatizacaoService; class AutomatizacaoForm extends \Core_Form { /** @var string */ public const ACTION = '/automatizacao/save'; /** @var AutomatizacaoService */ private $service; /** @var AutomatizacaoDto|null */ private $dto; /** * @param string $base * @param AutomatizacaoDto|null $dto * @throws \Zend_Form_Exception */ public function __construct(string $base, ?AutomatizacaoDto $dto = null) { $this->service = new AutomatizacaoService(); parent::__construct(); $this->setMethod('post'); $this->setName('automatizacao'); $this->setAction($base . self::ACTION); $this->dto = $dto; } public function init() { $this->addHidden('id') ->addTwoOptionsElement('reprocessar_atendimentos', 'Estratégia Reprocessamento', false) ->addTwoOptionsElement('relatorio_diario', 'Envio Relatórios Diários', false) ->addTwoOptionsElement('produtividade_supervisores', 'Desempenho Comercial Semanal', false) ->addElement('submit', 'salvar', $this->getOptions('Salvar', null, null, null, null, 'bt_save')) ->addDisplayGroup([ 'salvar' ], 'buttons'); $this->populate(); } /** * @param array $values * @return AutomatizacaoForm|void */ public function populate(array $values = []) { if ($this->dto && $this->dto->getId()) { parent::populate($this->dto->toArray()); } parent::populate($this->service->get()->toArray()); } }
💾 保存文件
← 返回文件管理器