test correct folder structure for plugin elements to be recognized
This commit is contained in:
parent
f82ab02cbf
commit
39334d8e4a
|
|
@ -0,0 +1,55 @@
|
|||
{#
|
||||
/**
|
||||
* CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
|
||||
* Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* For full copyright and license information, please see the LICENSE.txt
|
||||
* Redistributions of files must retain the above copyright notice.
|
||||
*
|
||||
* @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
|
||||
* @link https://cakephp.org CakePHP(tm) Project
|
||||
* @since 1.7.4
|
||||
* @license https://www.opensource.org/licenses/mit-license.php MIT License
|
||||
*/
|
||||
#}
|
||||
{{ element('Bake.file_header', {
|
||||
namespace: "#{namespace}\\Command",
|
||||
classImports: [
|
||||
'Cake\\Command\\Command',
|
||||
'Cake\\Console\\Arguments',
|
||||
'Cake\\Console\\ConsoleIo',
|
||||
'Cake\\Console\\ConsoleOptionParser',
|
||||
],
|
||||
}) }}
|
||||
|
||||
/**
|
||||
* {{ name }} command.
|
||||
*/
|
||||
class {{ name }}Command extends Command
|
||||
{
|
||||
/**
|
||||
* Hook method for defining this command's option parser.
|
||||
*
|
||||
* @see https://book.cakephp.org/4/en/console-commands/commands.html#defining-arguments-and-options
|
||||
* @param \Cake\Console\ConsoleOptionParser $parser The parser to be defined
|
||||
* @return \Cake\Console\ConsoleOptionParser The built parser.
|
||||
*/
|
||||
public function buildOptionParser(ConsoleOptionParser $parser): ConsoleOptionParser
|
||||
{
|
||||
$parser = parent::buildOptionParser($parser);
|
||||
|
||||
return $parser;
|
||||
}
|
||||
|
||||
/**
|
||||
* Implement this method with your command's logic.
|
||||
*
|
||||
* @param \Cake\Console\Arguments $args The command arguments.
|
||||
* @param \Cake\Console\ConsoleIo $io The console io
|
||||
* @return int|null|void The exit code or null for success
|
||||
*/
|
||||
public function execute(Arguments $args, ConsoleIo $io)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
{#
|
||||
/**
|
||||
* CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
|
||||
* Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* For full copyright and license information, please see the LICENSE.txt
|
||||
* Redistributions of files must retain the above copyright notice.
|
||||
*
|
||||
* @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
|
||||
* @link https://cakephp.org CakePHP(tm) Project
|
||||
* @since 2.6.0
|
||||
* @license https://www.opensource.org/licenses/mit-license.php MIT License
|
||||
*/
|
||||
#}
|
||||
{{ element('Bake.file_header', {
|
||||
namespace: "#{namespace}\\Command\\Helper",
|
||||
classImports: [
|
||||
'Cake\\Console\\Helper',
|
||||
],
|
||||
}) }}
|
||||
|
||||
/**
|
||||
* {{ name }} command helper.
|
||||
*/
|
||||
class {{ name }}Helper extends Helper
|
||||
{
|
||||
/**
|
||||
* This method should output content using `$this->_io`.
|
||||
*
|
||||
* @param array $args The arguments for the helper.
|
||||
* @return void
|
||||
*/
|
||||
public function output(array $args): void
|
||||
{
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
{#
|
||||
/**
|
||||
* CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
|
||||
* Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* For full copyright and license information, please see the LICENSE.txt
|
||||
* Redistributions of files must retain the above copyright notice.
|
||||
*
|
||||
* @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
|
||||
* @link https://cakephp.org CakePHP(tm) Project
|
||||
* @since 2.0.0
|
||||
* @license https://www.opensource.org/licenses/mit-license.php MIT License
|
||||
*/
|
||||
#}
|
||||
{{ element('Bake.file_header', {
|
||||
namespace: "#{namespace}\\Controller\\Component",
|
||||
classImports: [
|
||||
'Cake\\Controller\\Component',
|
||||
'Cake\\Controller\\ComponentRegistry',
|
||||
],
|
||||
}) }}
|
||||
|
||||
/**
|
||||
* {{ name }} component
|
||||
*/
|
||||
class {{ name }}Component extends Component
|
||||
{
|
||||
/**
|
||||
* Default configuration.
|
||||
*
|
||||
* @var array<string, mixed>
|
||||
*/
|
||||
protected array $_defaultConfig = [];
|
||||
}
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
{#
|
||||
/**
|
||||
* Controller bake template file
|
||||
*
|
||||
* Allows templating of Controllers generated from bake.
|
||||
*
|
||||
* CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
|
||||
* Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* For full copyright and license information, please see the LICENSE.txt
|
||||
* Redistributions of files must retain the above copyright notice.
|
||||
*
|
||||
* @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
|
||||
* @link https://cakephp.org CakePHP(tm) Project
|
||||
* @since 2.0.0
|
||||
* @license https://www.opensource.org/licenses/mit-license.php MIT License
|
||||
*/
|
||||
#}
|
||||
{{ element('Bake.file_header', {
|
||||
namespace: "#{namespace}\\Controller#{prefix}",
|
||||
classImports: (plugin or prefix) ? ["#{baseNamespace}\\Controller\\AppController"] : [],
|
||||
}) }}
|
||||
|
||||
/**
|
||||
* {{ name }} Controller
|
||||
*
|
||||
{% if defaultModel %}
|
||||
* @property \{{ defaultModel }} ${{ name }}
|
||||
{% endif %}
|
||||
|
||||
{%- for component in components %}
|
||||
{% set classInfo = Bake.classInfo(component, 'Controller/Component', 'Component') %}
|
||||
* @property {{ classInfo.fqn }} ${{ classInfo.name }}
|
||||
{% endfor %}
|
||||
*/
|
||||
class {{ name }}Controller extends AppController
|
||||
{
|
||||
{% if components or helpers %}
|
||||
/**
|
||||
* Initialize controller
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function initialize(): void
|
||||
{
|
||||
parent::initialize();
|
||||
|
||||
{% for component in components %}
|
||||
$this->loadComponent('{{ component }}');
|
||||
{% endfor %}
|
||||
{% if helpers %}
|
||||
$this->viewBuilder()->setHelpers({{ Bake.exportArray(helpers)|raw }});
|
||||
{% endif %}
|
||||
}
|
||||
{% if actions|length %}{{ "\n" }}{% endif %}
|
||||
{% endif %}
|
||||
{%- for action in actions %}
|
||||
{% if loop.index > 1 %}{{ "\n" }}{% endif %}
|
||||
{{- element('Bake.Controller/' ~ action) -}}
|
||||
{% endfor %}
|
||||
}
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
{#
|
||||
/**
|
||||
* CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
|
||||
* Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* For full copyright and license information, please see the LICENSE.txt
|
||||
* Redistributions of files must retain the above copyright notice.
|
||||
*
|
||||
* @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
|
||||
* @link https://cakephp.org CakePHP(tm) Project
|
||||
* @since 2.0.0
|
||||
* @license https://www.opensource.org/licenses/mit-license.php MIT License
|
||||
*/
|
||||
#}
|
||||
{{ element('Bake.file_header', {
|
||||
namespace: "#{namespace}\\Form",
|
||||
classImports: [
|
||||
'Cake\\Form\\Form',
|
||||
'Cake\\Form\\Schema',
|
||||
'Cake\\Validation\\Validator',
|
||||
],
|
||||
}) }}
|
||||
|
||||
/**
|
||||
* {{ name }} Form.
|
||||
*/
|
||||
class {{ name }}Form extends Form
|
||||
{
|
||||
/**
|
||||
* Builds the schema for the modelless form
|
||||
*
|
||||
* @param \Cake\Form\Schema $schema From schema
|
||||
* @return \Cake\Form\Schema
|
||||
*/
|
||||
protected function _buildSchema(Schema $schema): Schema
|
||||
{
|
||||
return $schema;
|
||||
}
|
||||
|
||||
/**
|
||||
* Form validation builder
|
||||
*
|
||||
* @param \Cake\Validation\Validator $validator to use against the form
|
||||
* @return \Cake\Validation\Validator
|
||||
*/
|
||||
public function validationDefault(Validator $validator): Validator
|
||||
{
|
||||
return $validator;
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines what to execute once the Form is processed
|
||||
*
|
||||
* @param array $data Form data.
|
||||
* @return bool
|
||||
*/
|
||||
protected function _execute(array $data): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
{#
|
||||
/**
|
||||
* CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
|
||||
* Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* For full copyright and license information, please see the LICENSE.txt
|
||||
* Redistributions of files must retain the above copyright notice.
|
||||
*
|
||||
* @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
|
||||
* @link https://cakephp.org CakePHP(tm) Project
|
||||
* @since 2.0.0
|
||||
* @license https://www.opensource.org/licenses/mit-license.php MIT License
|
||||
*/
|
||||
#}
|
||||
{{ element('Bake.file_header', {
|
||||
namespace: "#{namespace}\\Mailer",
|
||||
classImports: [
|
||||
'Cake\\Mailer\\Mailer',
|
||||
],
|
||||
}) }}
|
||||
|
||||
/**
|
||||
* {{ name }} mailer.
|
||||
*/
|
||||
class {{ name }}Mailer extends Mailer
|
||||
{
|
||||
/**
|
||||
* Mailer's name.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public static string $name = '{{ name }}';
|
||||
}
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
{#
|
||||
/**
|
||||
* CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
|
||||
* Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* For full copyright and license information, please see the LICENSE.txt
|
||||
* Redistributions of files must retain the above copyright notice.
|
||||
*
|
||||
* @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
|
||||
* @link https://cakephp.org CakePHP(tm) Project
|
||||
* @since 2.0.0
|
||||
* @license https://www.opensource.org/licenses/mit-license.php MIT License
|
||||
*/
|
||||
#}
|
||||
{{ element('Bake.file_header', {
|
||||
namespace: "#{namespace}\\Middleware",
|
||||
classImports: [
|
||||
'Psr\\Http\\Message\\ResponseInterface',
|
||||
'Psr\\Http\\Message\\ServerRequestInterface',
|
||||
'Psr\\Http\\Server\\MiddlewareInterface',
|
||||
'Psr\\Http\\Server\\RequestHandlerInterface',
|
||||
],
|
||||
}) }}
|
||||
|
||||
/**
|
||||
* {{ name }} middleware
|
||||
*/
|
||||
class {{ name }}Middleware implements MiddlewareInterface
|
||||
{
|
||||
/**
|
||||
* Process method.
|
||||
*
|
||||
* @param \Psr\Http\Message\ServerRequestInterface $request The request.
|
||||
* @param \Psr\Http\Server\RequestHandlerInterface $handler The request handler.
|
||||
* @return \Psr\Http\Message\ResponseInterface A response.
|
||||
*/
|
||||
public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
|
||||
{
|
||||
return $handler->handle($request);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
{#
|
||||
/**
|
||||
* CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
|
||||
* Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* For full copyright and license information, please see the LICENSE.txt
|
||||
* Redistributions of files must retain the above copyright notice.
|
||||
*
|
||||
* @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
|
||||
* @link https://cakephp.org CakePHP(tm) Project
|
||||
* @since 2.0.0
|
||||
* @license https://www.opensource.org/licenses/mit-license.php MIT License
|
||||
*/
|
||||
#}
|
||||
{{ element('Bake.file_header', {
|
||||
namespace: "#{namespace}\\Model\\Behavior",
|
||||
classImports: [
|
||||
'Cake\\ORM\\Behavior',
|
||||
'Cake\\ORM\\Table',
|
||||
],
|
||||
}) }}
|
||||
|
||||
/**
|
||||
* {{ name }} behavior
|
||||
*/
|
||||
class {{ name }}Behavior extends Behavior
|
||||
{
|
||||
/**
|
||||
* Default configuration.
|
||||
*
|
||||
* @var array<string, mixed>
|
||||
*/
|
||||
protected array $_defaultConfig = [];
|
||||
}
|
||||
|
|
@ -0,0 +1,76 @@
|
|||
{#
|
||||
/**
|
||||
* CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
|
||||
* Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* For full copyright and license information, please see the LICENSE.txt
|
||||
* Redistributions of files must retain the above copyright notice.
|
||||
*
|
||||
* @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
|
||||
* @link https://cakephp.org CakePHP(tm) Project
|
||||
* @since 2.0.0
|
||||
* @license https://www.opensource.org/licenses/mit-license.php MIT License
|
||||
*/
|
||||
#}
|
||||
{% set propertyHintMap = DocBlock.buildEntityPropertyHintTypeMap(propertySchema ?: []) %}
|
||||
{% set associationHintMap = DocBlock.buildEntityAssociationHintTypeMap(propertySchema ?: []) %}
|
||||
{% set annotations = DocBlock.propertyHints(propertyHintMap) %}
|
||||
|
||||
{%- if associationHintMap %}
|
||||
{%- set annotations = annotations|merge(['']) %}
|
||||
{%- set annotations = annotations|merge(DocBlock.propertyHints(associationHintMap)) %}
|
||||
{% endif %}
|
||||
|
||||
{%- set accessible = Bake.getFieldAccessibility(fields, primaryKey) %}
|
||||
|
||||
{%- set generatedProperties = [] %}
|
||||
{{ element('Bake.file_header', {
|
||||
namespace: fileBuilder.namespace,
|
||||
classImports: fileBuilder.classImports(['Cake\\ORM\\Entity']),
|
||||
}) }}
|
||||
|
||||
{{ DocBlock.classDescription(name, 'Entity', annotations)|raw }}
|
||||
class {{ name }} extends Entity{{ fileBuilder.classBuilder.implements ? ' implements ' ~ fileBuilder.classBuilder.implements|join(', ') : '' }}
|
||||
{
|
||||
{% set userConstants = fileBuilder.classBuilder.userConstants([]) %}
|
||||
{% if userConstants %}
|
||||
{{~ Bake.concat('\n\n', userConstants) }}
|
||||
|
||||
{% endif %}
|
||||
{% if accessible %}
|
||||
{%- set generatedProperties = generatedProperties|merge(['_accessible']) %}
|
||||
/**
|
||||
* Fields that can be mass assigned using newEntity() or patchEntity().
|
||||
*
|
||||
* Note that when '*' is set to true, this allows all unspecified fields to
|
||||
* be mass assigned. For security purposes, it is advised to set '*' to false
|
||||
* (or remove it), and explicitly make individual fields accessible as needed.
|
||||
*
|
||||
* @var array<string, bool>
|
||||
*/
|
||||
protected array $_accessible = {{ Bake.exportVar(accessible, 1)|raw }};
|
||||
{% endif %}
|
||||
{% if accessible and hidden %}
|
||||
|
||||
{% endif %}
|
||||
{%- if hidden %}
|
||||
{%- set generatedProperties = generatedProperties|merge(['_hidden']) %}
|
||||
/**
|
||||
* Fields that are excluded from JSON versions of the entity.
|
||||
*
|
||||
* @var array<string>
|
||||
*/
|
||||
protected array $_hidden = {{ Bake.exportVar(hidden, 1)|raw }};
|
||||
{% endif %}
|
||||
{% set userProperties = fileBuilder.classBuilder.userProperties(generatedProperties) %}
|
||||
{% if userProperties %}
|
||||
|
||||
{{~ Bake.concat('\n\n', userProperties) }}
|
||||
{% endif %}
|
||||
{% set userFunctions = fileBuilder.classBuilder.userFunctions([]) %}
|
||||
{% if userFunctions %}
|
||||
|
||||
{{~ Bake.concat('\n\n', userFunctions) }}
|
||||
{% endif %}
|
||||
}
|
||||
|
|
@ -0,0 +1,162 @@
|
|||
{#
|
||||
/**
|
||||
* CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
|
||||
* Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* For full copyright and license information, please see the LICENSE.txt
|
||||
* Redistributions of files must retain the above copyright notice.
|
||||
*
|
||||
* @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
|
||||
* @link https://cakephp.org CakePHP(tm) Project
|
||||
* @since 2.0.0
|
||||
* @license https://www.opensource.org/licenses/mit-license.php MIT License
|
||||
*/
|
||||
#}
|
||||
{% set annotations = DocBlock.buildTableAnnotations(associations, associationInfo, behaviors, entity, namespace) %}
|
||||
{% set generatedFunctions = ['initialize'] %}
|
||||
{{ element('Bake.file_header', {
|
||||
namespace: fileBuilder.namespace,
|
||||
classImports: fileBuilder.classImports(['Cake\\ORM\\Query\\SelectQuery', 'Cake\\ORM\\RulesChecker', 'Cake\\ORM\\Table', 'Cake\\Validation\\Validator']),
|
||||
}) }}
|
||||
|
||||
{{ DocBlock.classDescription(name, 'Model', annotations)|raw }}
|
||||
class {{ name }}Table extends Table{{ fileBuilder.classBuilder.implements ? ' implements ' ~ fileBuilder.classBuilder.implements|join(', ') : '' }}
|
||||
{
|
||||
{% set userConstants = fileBuilder.classBuilder.userConstants([]) %}
|
||||
{% if userConstants %}
|
||||
{{~ Bake.concat('\n\n', userConstants) }}
|
||||
|
||||
{% endif %}
|
||||
{% set userProperties = fileBuilder.classBuilder.userProperties([]) %}
|
||||
{% if userProperties %}
|
||||
{{~ Bake.concat('\n\n', userProperties) }}
|
||||
|
||||
{% endif %}
|
||||
/**
|
||||
* Initialize method
|
||||
*
|
||||
* @param array<string, mixed> $config The configuration for the Table.
|
||||
* @return void
|
||||
*/
|
||||
public function initialize(array $config): void
|
||||
{
|
||||
parent::initialize($config);
|
||||
|
||||
{% if table %}
|
||||
$this->setTable('{{ table }}');
|
||||
{% endif %}
|
||||
|
||||
{%- if displayField %}
|
||||
$this->setDisplayField({{ (displayField is iterable ? Bake.exportArray(displayField) : Bake.exportVar(displayField))|raw }});
|
||||
{% endif %}
|
||||
|
||||
{%- if primaryKey %}
|
||||
{%- if primaryKey is iterable and primaryKey|length > 1 %}
|
||||
$this->setPrimaryKey({{ Bake.exportArray(primaryKey)|raw }});
|
||||
{{- "\n" }}
|
||||
{%- else %}
|
||||
$this->setPrimaryKey('{{ primaryKey|as_array|first }}');
|
||||
{{- "\n" }}
|
||||
{%- endif %}
|
||||
{% endif %}
|
||||
|
||||
{%- if behaviors %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{%- for behavior, behaviorData in behaviors %}
|
||||
$this->addBehavior('{{ behavior }}'{{ (behaviorData ? (", " ~ Bake.exportArray(behaviorData, 2)|raw ~ '') : '')|raw }});
|
||||
{% endfor %}
|
||||
|
||||
{%- if associations.belongsTo or associations.hasMany or associations.belongsToMany %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{%- for type, assocs in associations %}
|
||||
{%- for assoc in assocs %}
|
||||
{%- set assocData = [] %}
|
||||
{%- for key, val in assoc %}
|
||||
{%- if key is not same as('alias') %}
|
||||
{%- set assocData = assocData|merge({(key): val}) %}
|
||||
{%- endif %}
|
||||
{%- endfor %}
|
||||
$this->{{ type }}('{{ assoc.alias }}', {{ Bake.exportArray(assocData, 2)|raw }});
|
||||
{{- "\n" }}
|
||||
{%- endfor %}
|
||||
{% endfor %}
|
||||
}
|
||||
{{- "\n" }}
|
||||
|
||||
{%- if validation %}
|
||||
{% set generatedFunctions = generatedFunctions|merge(['validationDefault']) %}
|
||||
|
||||
/**
|
||||
* Default validation rules.
|
||||
*
|
||||
* @param \Cake\Validation\Validator $validator Validator instance.
|
||||
* @return \Cake\Validation\Validator
|
||||
*/
|
||||
public function validationDefault(Validator $validator): Validator
|
||||
{
|
||||
{% for field, rules in validation %}
|
||||
{% set validationMethods = Bake.getValidationMethods(field, rules) %}
|
||||
{% if validationMethods %}
|
||||
$validator
|
||||
{% for validationMethod in validationMethods %}
|
||||
{% if loop.last %}
|
||||
{% set validationMethod = validationMethod ~ ';' %}
|
||||
{% endif %}
|
||||
{{ validationMethod|raw }}
|
||||
{% endfor %}
|
||||
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
return $validator;
|
||||
}
|
||||
{% endif %}
|
||||
|
||||
{%- if rulesChecker %}
|
||||
{% set generatedFunctions = generatedFunctions|merge(['buildRules']) %}
|
||||
|
||||
/**
|
||||
* Returns a rules checker object that will be used for validating
|
||||
* application integrity.
|
||||
*
|
||||
* @param \Cake\ORM\RulesChecker $rules The rules object to be modified.
|
||||
* @return \Cake\ORM\RulesChecker
|
||||
*/
|
||||
public function buildRules(RulesChecker $rules): RulesChecker
|
||||
{
|
||||
{% for field, rule in rulesChecker %}
|
||||
{% set fields = rule.fields is defined ? Bake.exportArray(rule.fields) : Bake.exportVar(field) %}
|
||||
{% set options = '' %}
|
||||
{% for optionName, optionValue in rule.options %}
|
||||
{%~ set options = (loop.first ? '[' : options) ~ "'#{optionName}' => " ~ Bake.exportVar(optionValue) ~ (loop.last ? ']' : ', ') %}
|
||||
{% endfor %}
|
||||
$rules->add($rules->{{ rule.name }}({{ fields|raw }}{{ (rule.extra|default ? ", '#{rule.extra}'" : '')|raw }}{{ (options ? ', ' ~ options : '')|raw }}), ['errorField' => '{{ field }}']);
|
||||
{% endfor %}
|
||||
|
||||
return $rules;
|
||||
}
|
||||
{% endif %}
|
||||
|
||||
{%- if connection is not same as('default') %}
|
||||
{% set generatedFunctions = generatedFunctions|merge(['defaultConnectionName']) %}
|
||||
|
||||
/**
|
||||
* Returns the database connection name to use by default.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function defaultConnectionName(): string
|
||||
{
|
||||
return '{{ connection }}';
|
||||
}
|
||||
{% endif %}
|
||||
{% set userFunctions = fileBuilder.classBuilder.userFunctions(generatedFunctions) %}
|
||||
{% if userFunctions %}
|
||||
|
||||
{{~ Bake.concat('\n\n', userFunctions) }}
|
||||
{% endif %}
|
||||
}
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
/composer.lock
|
||||
/composer.phar
|
||||
/phpunit.xml
|
||||
/.phpunit.result.cache
|
||||
/phpunit.phar
|
||||
/config/Migrations/schema-dump-default.lock
|
||||
/vendor/
|
||||
/.idea/
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
{#
|
||||
/**
|
||||
* CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
|
||||
* Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* For full copyright and license information, please see the LICENSE.txt
|
||||
* Redistributions of files must retain the above copyright notice.
|
||||
*
|
||||
* @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
|
||||
* @link https://cakephp.org CakePHP(tm) Project
|
||||
* @since 2.0.0
|
||||
* @license https://www.opensource.org/licenses/mit-license.php MIT License
|
||||
*/
|
||||
#}
|
||||
# {{ plugin }} plugin for CakePHP
|
||||
|
||||
## Installation
|
||||
|
||||
You can install this plugin into your CakePHP application using [composer](https://getcomposer.org).
|
||||
|
||||
The recommended way to install composer packages is:
|
||||
|
||||
```
|
||||
composer require {{ package }}
|
||||
```
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
{#
|
||||
/**
|
||||
* CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
|
||||
* Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* For full copyright and license information, please see the LICENSE.txt
|
||||
* Redistributions of files must retain the above copyright notice.
|
||||
*
|
||||
* @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
|
||||
* @link https://cakephp.org CakePHP(tm) Project
|
||||
* @since 2.0.0
|
||||
* @license https://www.opensource.org/licenses/mit-license.php MIT License
|
||||
*/
|
||||
#}
|
||||
{% set namespace = namespace|replace({'\\': '\\\\'}) %}
|
||||
{
|
||||
"name": "{{ package }}",
|
||||
"description": "{{ plugin }} plugin for CakePHP",
|
||||
"type": "cakephp-plugin",
|
||||
"license": "MIT",
|
||||
"require": {
|
||||
"php": ">=8.1",
|
||||
"cakephp/cakephp": "{{ cakeVersion|raw }}"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^10.1"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"{{ namespace }}\\": "src/"
|
||||
}
|
||||
},
|
||||
"autoload-dev": {
|
||||
"psr-4": {
|
||||
"{{ namespace }}\\Test\\": "tests/",
|
||||
"Cake\\Test\\": "vendor/cakephp/cakephp/tests/"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,45 @@
|
|||
{#
|
||||
/**
|
||||
* CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
|
||||
* Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* For full copyright and license information, please see the LICENSE.txt
|
||||
* Redistributions of files must retain the above copyright notice.
|
||||
*
|
||||
* @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
|
||||
* @link https://cakephp.org CakePHP(tm) Project
|
||||
* @since 2.0.0
|
||||
* @license https://www.opensource.org/licenses/mit-license.php MIT License
|
||||
*/
|
||||
#}
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<phpunit
|
||||
colors="true"
|
||||
processIsolation="false"
|
||||
stopOnFailure="false"
|
||||
bootstrap="tests/bootstrap.php"
|
||||
>
|
||||
<php>
|
||||
<ini name="memory_limit" value="-1"/>
|
||||
<ini name="apc.enable_cli" value="1"/>
|
||||
</php>
|
||||
|
||||
<!-- Add any additional test suites you want to run here -->
|
||||
<testsuites>
|
||||
<testsuite name="{{ plugin }}">
|
||||
<directory>tests/TestCase/</directory>
|
||||
</testsuite>
|
||||
</testsuites>
|
||||
|
||||
<!-- Setup fixture extension -->
|
||||
<extensions>
|
||||
<extension class="Cake\TestSuite\Fixture\PHPUnitExtension"/>
|
||||
</extensions>
|
||||
|
||||
<coverage>
|
||||
<include>
|
||||
<directory suffix=".php">src/</directory>
|
||||
</include>
|
||||
</coverage>
|
||||
</phpunit>
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
{#
|
||||
/**
|
||||
* CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
|
||||
* Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* For full copyright and license information, please see the LICENSE.txt
|
||||
* Redistributions of files must retain the above copyright notice.
|
||||
*
|
||||
* @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
|
||||
* @link https://cakephp.org CakePHP(tm) Project
|
||||
* @since 2.0.0
|
||||
* @license https://www.opensource.org/licenses/mit-license.php MIT License
|
||||
*/
|
||||
#}
|
||||
{{ element('Bake.file_header', {
|
||||
namespace: "#{namespace}\\Controller",
|
||||
classImports: {
|
||||
'BaseController': "#{baseNamespace}\\Controller\\AppController",
|
||||
},
|
||||
}) }}
|
||||
|
||||
class AppController extends BaseController
|
||||
{
|
||||
}
|
||||
|
|
@ -0,0 +1,108 @@
|
|||
{#
|
||||
/**
|
||||
* CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
|
||||
* Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* For full copyright and license information, please see the LICENSE.txt
|
||||
* Redistributions of files must retain the above copyright notice.
|
||||
*
|
||||
* @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
|
||||
* @link https://cakephp.org CakePHP(tm) Project
|
||||
* @since 1.7.0
|
||||
* @license https://www.opensource.org/licenses/mit-license.php MIT License
|
||||
*/
|
||||
#}
|
||||
{{ element('Bake.file_header', {
|
||||
namespace: "#{namespace}",
|
||||
classImports: [
|
||||
'Cake\\Console\\CommandCollection',
|
||||
'Cake\\Core\\BasePlugin',
|
||||
'Cake\\Core\\ContainerInterface',
|
||||
'Cake\\Core\\PluginApplicationInterface',
|
||||
'Cake\\Http\\MiddlewareQueue',
|
||||
'Cake\\Routing\\RouteBuilder',
|
||||
],
|
||||
}) }}
|
||||
|
||||
/**
|
||||
* Plugin for {{ namespace }}
|
||||
*/
|
||||
class {{ name }}Plugin extends BasePlugin
|
||||
{
|
||||
/**
|
||||
* Load all the plugin configuration and bootstrap logic.
|
||||
*
|
||||
* The host application is provided as an argument. This allows you to load
|
||||
* additional plugin dependencies, or attach events.
|
||||
*
|
||||
* @param \Cake\Core\PluginApplicationInterface $app The host application
|
||||
* @return void
|
||||
*/
|
||||
public function bootstrap(PluginApplicationInterface $app): void
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Add routes for the plugin.
|
||||
*
|
||||
* If your plugin has many routes and you would like to isolate them into a separate file,
|
||||
* you can create `$plugin/config/routes.php` and delete this method.
|
||||
*
|
||||
* @param \Cake\Routing\RouteBuilder $routes The route builder to update.
|
||||
* @return void
|
||||
*/
|
||||
public function routes(RouteBuilder $routes): void
|
||||
{
|
||||
$routes->plugin(
|
||||
'{{ plugin }}',
|
||||
['path' => '/{{ routePath }}'],
|
||||
function (RouteBuilder $builder) {
|
||||
// Add custom routes here
|
||||
|
||||
$builder->fallbacks();
|
||||
}
|
||||
);
|
||||
parent::routes($routes);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add middleware for the plugin.
|
||||
*
|
||||
* @param \Cake\Http\MiddlewareQueue $middlewareQueue The middleware queue to update.
|
||||
* @return \Cake\Http\MiddlewareQueue
|
||||
*/
|
||||
public function middleware(MiddlewareQueue $middlewareQueue): MiddlewareQueue
|
||||
{
|
||||
// Add your middlewares here
|
||||
|
||||
return $middlewareQueue;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add commands for the plugin.
|
||||
*
|
||||
* @param \Cake\Console\CommandCollection $commands The command collection to update.
|
||||
* @return \Cake\Console\CommandCollection
|
||||
*/
|
||||
public function console(CommandCollection $commands): CommandCollection
|
||||
{
|
||||
// Add your commands here
|
||||
|
||||
$commands = parent::console($commands);
|
||||
|
||||
return $commands;
|
||||
}
|
||||
|
||||
/**
|
||||
* Register application container services.
|
||||
*
|
||||
* @param \Cake\Core\ContainerInterface $container The Container to update.
|
||||
* @return void
|
||||
* @link https://book.cakephp.org/4/en/development/dependency-injection.html#dependency-injection
|
||||
*/
|
||||
public function services(ContainerInterface $container): void
|
||||
{
|
||||
// Add your services here
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,71 @@
|
|||
{#
|
||||
/**
|
||||
* Tests bootstrap file
|
||||
*
|
||||
* CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
|
||||
* Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* For full copyright and license information, please see the LICENSE.txt
|
||||
* Redistributions of files must retain the above copyright notice.
|
||||
*
|
||||
* @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
|
||||
* @link https://cakephp.org CakePHP(tm) Project
|
||||
* @since 2.0.0
|
||||
* @license https://www.opensource.org/licenses/mit-license.php MIT License
|
||||
*/
|
||||
#}
|
||||
{{ element('Bake.file_header',{namespace: null}) }}
|
||||
|
||||
/**
|
||||
* Test suite bootstrap for {{ plugin }}.
|
||||
*
|
||||
* This function is used to find the location of CakePHP whether CakePHP
|
||||
* has been installed as a dependency of the plugin, or the plugin is itself
|
||||
* installed as a dependency of an application.
|
||||
*/
|
||||
$findRoot = function ($root) {
|
||||
do {
|
||||
$lastRoot = $root;
|
||||
$root = dirname($root);
|
||||
if (is_dir($root . '/vendor/cakephp/cakephp')) {
|
||||
return $root;
|
||||
}
|
||||
} while ($root !== $lastRoot);
|
||||
|
||||
throw new Exception('Cannot find the root of the application, unable to run tests');
|
||||
};
|
||||
$root = $findRoot(__FILE__);
|
||||
unset($findRoot);
|
||||
|
||||
chdir($root);
|
||||
|
||||
require_once $root . '/vendor/autoload.php';
|
||||
|
||||
/**
|
||||
* Define fallback values for required constants and configuration.
|
||||
* To customize constants and configuration remove this require
|
||||
* and define the data required by your plugin here.
|
||||
*/
|
||||
require_once $root . '/vendor/cakephp/cakephp/tests/bootstrap.php';
|
||||
|
||||
if (file_exists($root . '/config/bootstrap.php')) {
|
||||
require $root . '/config/bootstrap.php';
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Load schema from a SQL dump file.
|
||||
*
|
||||
* If your plugin does not use database fixtures you can
|
||||
* safely delete this.
|
||||
*
|
||||
* If you want to support multiple databases, consider
|
||||
* using migrations to provide schema for your plugin,
|
||||
* and using \Migrations\TestSuite\Migrator to load schema.
|
||||
*/
|
||||
use Cake\TestSuite\Fixture\SchemaLoader;
|
||||
|
||||
// Load a schema dump file.
|
||||
(new SchemaLoader())->loadSqlFiles('tests/schema.sql', 'test');
|
||||
|
|
@ -0,0 +1 @@
|
|||
-- Test database schema for {{ plugin }}
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
{#
|
||||
/**
|
||||
* CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
|
||||
* Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* For full copyright and license information, please see the LICENSE.txt
|
||||
* Redistributions of files must retain the above copyright notice.
|
||||
*
|
||||
* @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
|
||||
* @link https://cakephp.org CakePHP(tm) Project
|
||||
* @since 2.0.0
|
||||
* @license https://www.opensource.org/licenses/mit-license.php MIT License
|
||||
*/
|
||||
#}
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
{#
|
||||
/**
|
||||
* CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
|
||||
* Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* For full copyright and license information, please see the LICENSE.txt
|
||||
* Redistributions of files must retain the above copyright notice.
|
||||
*
|
||||
* @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
|
||||
* @link https://cakephp.org CakePHP(tm) Project
|
||||
* @since 2.0.0
|
||||
* @license https://www.opensource.org/licenses/mit-license.php MIT License
|
||||
*/
|
||||
#}
|
||||
<?php
|
||||
/**
|
||||
* @var \{{ namespace }}\View\AppView $this
|
||||
* @var \{{ entityClass }} ${{ singularVar }}
|
||||
{{- "\n" }}
|
||||
{%- if associations.BelongsTo is defined %}
|
||||
{%- for assocName, assocData in associations.BelongsTo %}
|
||||
* @var \Cake\Collection\CollectionInterface|string[] ${{ assocData.variable }}
|
||||
{{- "\n" }}
|
||||
{%- endfor %}
|
||||
{% endif %}
|
||||
{%- if associations.BelongsToMany is defined %}
|
||||
{%- for assocName, assocData in associations.BelongsToMany %}
|
||||
* @var \Cake\Collection\CollectionInterface|string[] ${{ assocData.variable }}
|
||||
{{- "\n" }}
|
||||
{%- endfor %}
|
||||
{% endif %}
|
||||
*/
|
||||
?>
|
||||
{{ element('Bake.form') }}
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
{#
|
||||
/**
|
||||
* CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
|
||||
* Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* For full copyright and license information, please see the LICENSE.txt
|
||||
* Redistributions of files must retain the above copyright notice.
|
||||
*
|
||||
* @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
|
||||
* @link https://cakephp.org CakePHP(tm) Project
|
||||
* @since 2.0.0
|
||||
* @license https://www.opensource.org/licenses/mit-license.php MIT License
|
||||
*/
|
||||
#}
|
||||
<?php
|
||||
/**
|
||||
* @var \{{ namespace }}\View\AppView $this
|
||||
* @var \{{ entityClass }} ${{ singularVar }}
|
||||
{{- "\n" }}
|
||||
{%- if associations.BelongsTo is defined %}
|
||||
{%- for assocName, assocData in associations.BelongsTo %}
|
||||
* @var string[]|\Cake\Collection\CollectionInterface ${{ assocData.variable }}
|
||||
{{- "\n" }}
|
||||
{%- endfor %}
|
||||
{% endif %}
|
||||
{%- if associations.BelongsToMany is defined %}
|
||||
{%- for assocName, assocData in associations.BelongsToMany %}
|
||||
* @var string[]|\Cake\Collection\CollectionInterface ${{ assocData.variable }}
|
||||
{{- "\n" }}
|
||||
{%- endfor %}
|
||||
{% endif %}
|
||||
*/
|
||||
?>
|
||||
{{ element('Bake.form') }}
|
||||
|
|
@ -0,0 +1,82 @@
|
|||
{#
|
||||
/**
|
||||
* CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
|
||||
* Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* For full copyright and license information, please see the LICENSE.txt
|
||||
* Redistributions of files must retain the above copyright notice.
|
||||
*
|
||||
* @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
|
||||
* @link https://cakephp.org CakePHP(tm) Project
|
||||
* @since 2.0.0
|
||||
* @license https://www.opensource.org/licenses/mit-license.php MIT License
|
||||
*/
|
||||
#}
|
||||
<?php
|
||||
/**
|
||||
* @var \{{ namespace }}\View\AppView $this
|
||||
* @var iterable<\{{ entityClass }}> ${{ pluralVar }}
|
||||
*/
|
||||
?>
|
||||
<div class="{{ pluralVar }} index content">
|
||||
{% set fields = Bake.filterFields(fields, schema, modelObject, indexColumns, ['binary', 'text']) %}
|
||||
<?= $this->Html->link(__('New {{ singularHumanName }}'), ['action' => 'add'], ['class' => 'button float-right']) ?>
|
||||
{% set done = [] %}
|
||||
<h3><?= __('{{ pluralHumanName }}') ?></h3>
|
||||
<div class="table-responsive" id="table-container">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
{% for field in fields %}
|
||||
<th><?= $this->Paginator->sort('{{ field }}') ?></th>
|
||||
{% endfor %}
|
||||
<th class="actions"><?= __('Actions') ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach (${{ pluralVar }} as ${{ singularVar }}): ?>
|
||||
<tr>
|
||||
{% for field in fields %}
|
||||
{% set isKey = false %}
|
||||
{% if associations.BelongsTo is defined %}
|
||||
{% for alias, details in associations.BelongsTo %}
|
||||
{% if field == details.foreignKey %}
|
||||
{% set isKey = true %}
|
||||
<td><?= ${{ singularVar }}->hasValue('{{ details.property }}') ? $this->Html->link(${{ singularVar }}->{{ details.property }}->{{ details.displayField }}, ['controller' => '{{ details.controller }}', 'action' => 'view', ${{ singularVar }}->{{ details.property }}->{{ details.primaryKey[0] }}]) : '' ?></td>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% if isKey is not same as(true) %}
|
||||
{% set columnData = Bake.columnData(field, schema) %}
|
||||
{% if columnData.type not in ['integer', 'float', 'decimal', 'biginteger', 'smallinteger', 'tinyinteger'] %}
|
||||
<td><?= h(${{ singularVar }}->{{ field }}) ?></td>
|
||||
{% elseif columnData.null %}
|
||||
<td><?= ${{ singularVar }}->{{ field }} === null ? '' : $this->Number->format(${{ singularVar }}->{{ field }}) ?></td>
|
||||
{% else %}
|
||||
<td><?= $this->Number->format(${{ singularVar }}->{{ field }}) ?></td>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% set pk = '$' ~ singularVar ~ '->' ~ primaryKey[0] %}
|
||||
<td class="actions">
|
||||
<?= $this->Html->link(__('View'), ['action' => 'view', {{ pk|raw }}]) ?>
|
||||
<?= $this->Html->link(__('Edit'), ['action' => 'edit', {{ pk|raw }}]) ?>
|
||||
<?= $this->Form->postLink(__('Delete'), ['action' => 'delete', {{ pk|raw }}], ['confirm' => __('Are you sure you want to delete # {0}?', {{ pk|raw }})]) ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="paginator">
|
||||
<ul class="pagination">
|
||||
<?= $this->Paginator->first('<< ' . __('first')) ?>
|
||||
<?= $this->Paginator->prev('< ' . __('previous')) ?>
|
||||
<?= $this->Paginator->numbers() ?>
|
||||
<?= $this->Paginator->next(__('next') . ' >') ?>
|
||||
<?= $this->Paginator->last(__('last') . ' >>') ?>
|
||||
</ul>
|
||||
<p><?= $this->Paginator->counter(__('Page {{ '{{' }}page{{ '}}' }} of {{ '{{' }}pages{{ '}}' }}, showing {{ '{{' }}current{{ '}}' }} record(s) out of {{ '{{' }}count{{ '}}' }} total')) ?></p>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
{#
|
||||
/**
|
||||
* CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
|
||||
* Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* For full copyright and license information, please see the LICENSE.txt
|
||||
* Redistributions of files must retain the above copyright notice.
|
||||
*
|
||||
* @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
|
||||
* @link https://cakephp.org CakePHP(tm) Project
|
||||
* @since 2.0.0
|
||||
* @license https://www.opensource.org/licenses/mit-license.php MIT License
|
||||
*/
|
||||
#}
|
||||
<?php
|
||||
/**
|
||||
* @var \{{ namespace }}\View\AppView $this
|
||||
*/
|
||||
?>
|
||||
<div class="{{ pluralVar }} form content">
|
||||
<?= $this->Form->create() ?>
|
||||
<fieldset>
|
||||
<legend><?= __('Please enter your username and password') ?></legend>
|
||||
<?= $this->Form->control('username') ?>
|
||||
<?= $this->Form->control('password') ?>
|
||||
</fieldset>
|
||||
<?= $this->Form->button(__('Login')); ?>
|
||||
<?= $this->Form->end() ?>
|
||||
</div>
|
||||
|
|
@ -0,0 +1,141 @@
|
|||
{#
|
||||
/**
|
||||
* CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
|
||||
* Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* For full copyright and license information, please see the LICENSE.txt
|
||||
* Redistributions of files must retain the above copyright notice.
|
||||
*
|
||||
* @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
|
||||
* @link https://cakephp.org CakePHP(tm) Project
|
||||
* @since 2.0.0
|
||||
* @license https://www.opensource.org/licenses/mit-license.php MIT License
|
||||
*/
|
||||
#}
|
||||
<?php
|
||||
/**
|
||||
* @var \{{ namespace }}\View\AppView $this
|
||||
* @var \{{ entityClass }} ${{ singularVar }}
|
||||
*/
|
||||
?>
|
||||
{% set associations = {'BelongsTo': [], 'HasOne': [], 'HasMany': [], 'BelongsToMany': []}|merge(associations) %}
|
||||
{% set fieldsData = Bake.getViewFieldsData(fields, schema, associations) %}
|
||||
{% set associationFields = fieldsData.associationFields %}
|
||||
{% set groupedFields = fieldsData.groupedFields %}
|
||||
{% set pK = '$' ~ singularVar ~ '->' ~ primaryKey[0] %}
|
||||
<div class="row">
|
||||
<aside class="column">
|
||||
<div class="side-nav">
|
||||
<h4 class="heading"><?= __('Actions') ?></h4>
|
||||
<?= $this->Html->link(__('Edit {{ singularHumanName }}'), ['action' => 'edit', {{ pK|raw }}], ['class' => 'side-nav-item']) ?>
|
||||
<?= $this->Form->postLink(__('Delete {{ singularHumanName }}'), ['action' => 'delete', {{ pK|raw }}], ['confirm' => __('Are you sure you want to delete # {0}?', {{ pK|raw }}), 'class' => 'side-nav-item']) ?>
|
||||
<?= $this->Html->link(__('List {{ pluralHumanName }}'), ['action' => 'index'], ['class' => 'side-nav-item']) ?>
|
||||
<?= $this->Html->link(__('New {{ singularHumanName }}'), ['action' => 'add'], ['class' => 'side-nav-item']) ?>
|
||||
{% set done = [] %}
|
||||
</div>
|
||||
</aside>
|
||||
<div class="column column-80">
|
||||
<div class="{{ pluralVar }} view content">
|
||||
<h3><?= h(${{ singularVar }}->{{ displayField }}) ?></h3>
|
||||
<table>
|
||||
{% if groupedFields['string'] %}
|
||||
{% for field in groupedFields['string'] %}
|
||||
{% if associationFields[field] is defined %}
|
||||
{% set details = associationFields[field] %}
|
||||
<tr>
|
||||
<th><?= __('{{ details.property|humanize }}') ?></th>
|
||||
<td><?= ${{ singularVar }}->hasValue('{{ details.property }}') ? $this->Html->link(${{ singularVar }}->{{ details.property }}->{{ details.displayField }}, ['controller' => '{{ details.controller }}', 'action' => 'view', ${{ singularVar }}->{{ details.property }}->{{ details.primaryKey[0] }}]) : '' ?></td>
|
||||
</tr>
|
||||
{% else %}
|
||||
<tr>
|
||||
<th><?= __('{{ field|humanize }}') ?></th>
|
||||
<td><?= h(${{ singularVar }}->{{ field }}) ?></td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% if associations.HasOne %}
|
||||
{% for alias, details in associations.HasOne %}
|
||||
<tr>
|
||||
<th><?= __('{{ alias|underscore|singularize|humanize }}') ?></th>
|
||||
<td><?= ${{ singularVar }}->hasValue('{{ details.property }}') ? $this->Html->link(${{ singularVar }}->{{ details.property }}->{{ details.displayField }}, ['controller' => '{{ details.controller }}', 'action' => 'view', ${{ singularVar }}->{{ details.property }}->{{ details.primaryKey[0] }}]) : '' ?></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% if groupedFields.number %}
|
||||
{% for field in groupedFields.number %}
|
||||
<tr>
|
||||
<th><?= __('{{ field|humanize }}') ?></th>
|
||||
{% set columnData = Bake.columnData(field, schema) %}
|
||||
{% if columnData.null %}
|
||||
<td><?= ${{ singularVar }}->{{ field }} === null ? '' : $this->Number->format(${{ singularVar }}->{{ field }}) ?></td>
|
||||
{% else %}
|
||||
<td><?= $this->Number->format(${{ singularVar }}->{{ field }}) ?></td>
|
||||
{% endif %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% if groupedFields.date %}
|
||||
{% for field in groupedFields.date %}
|
||||
<tr>
|
||||
<th><?= __('{{ field|humanize }}') ?></th>
|
||||
<td><?= h(${{ singularVar }}->{{ field }}) ?></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% if groupedFields.boolean %}
|
||||
{% for field in groupedFields.boolean %}
|
||||
<tr>
|
||||
<th><?= __('{{ field|humanize }}') ?></th>
|
||||
<td><?= ${{ singularVar }}->{{ field }} ? __('Yes') : __('No'); ?></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</table>
|
||||
{% if groupedFields.text %}
|
||||
{% for field in groupedFields.text %}
|
||||
<div class="text">
|
||||
<strong><?= __('{{ field|humanize }}') ?></strong>
|
||||
<blockquote>
|
||||
<?= $this->Text->autoParagraph(h(${{ singularVar }}->{{ field }})); ?>
|
||||
</blockquote>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% set relations = associations.BelongsToMany|merge(associations.HasMany) %}
|
||||
{% for alias, details in relations %}
|
||||
{% set otherSingularVar = alias|variable %}
|
||||
{% set otherPluralHumanName = details.controller|underscore|humanize %}
|
||||
<div class="related">
|
||||
<h4><?= __('Related {{ otherPluralHumanName }}') ?></h4>
|
||||
<?php if (!empty(${{ singularVar }}->{{ details.property }})) : ?>
|
||||
<div class="table-responsive">
|
||||
<table>
|
||||
<tr>
|
||||
{% for field in details.fields %}
|
||||
<th><?= __('{{ field|humanize }}') ?></th>
|
||||
{% endfor %}
|
||||
<th class="actions"><?= __('Actions') ?></th>
|
||||
</tr>
|
||||
<?php foreach (${{ singularVar }}->{{ details.property }} as ${{ otherSingularVar }}) : ?>
|
||||
<tr>
|
||||
{% for field in details.fields %}
|
||||
<td><?= h(${{ otherSingularVar }}->{{ field }}) ?></td>
|
||||
{% endfor %}
|
||||
{% set otherPk = '$' ~ otherSingularVar ~ '->' ~ details.primaryKey[0] %}
|
||||
<td class="actions">
|
||||
<?= $this->Html->link(__('View'), ['controller' => '{{ details.controller }}', 'action' => 'view', {{ otherPk|raw }}]) ?>
|
||||
<?= $this->Html->link(__('Edit'), ['controller' => '{{ details.controller }}', 'action' => 'edit', {{ otherPk|raw }}]) ?>
|
||||
<?= $this->Form->postLink(__('Delete'), ['controller' => '{{ details.controller }}', 'action' => 'delete', {{ otherPk|raw }}], ['confirm' => __('Are you sure you want to delete # {0}?', {{ otherPk|raw }})]) ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</table>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -0,0 +1,53 @@
|
|||
{#
|
||||
/**
|
||||
* CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
|
||||
* Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* For full copyright and license information, please see the LICENSE.txt
|
||||
* Redistributions of files must retain the above copyright notice.
|
||||
*
|
||||
* @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
|
||||
* @link https://cakephp.org CakePHP(tm) Project
|
||||
* @since 2.0.0
|
||||
* @license https://www.opensource.org/licenses/mit-license.php MIT License
|
||||
*/
|
||||
#}
|
||||
{{ element('Bake.file_header', {
|
||||
namespace: "#{namespace}\\View\\Cell#{prefix}",
|
||||
classImports: [
|
||||
'Cake\\View\\Cell',
|
||||
],
|
||||
}) }}
|
||||
|
||||
/**
|
||||
* {{ name }} cell
|
||||
*/
|
||||
class {{ name }}Cell extends Cell
|
||||
{
|
||||
/**
|
||||
* List of valid options that can be passed into this
|
||||
* cell's constructor.
|
||||
*
|
||||
* @var array<string, mixed>
|
||||
*/
|
||||
protected array $_validCellOptions = [];
|
||||
|
||||
/**
|
||||
* Initialization logic run at the end of object construction.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function initialize(): void
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Default display method.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function display()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
{#
|
||||
/**
|
||||
* CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
|
||||
* Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* For full copyright and license information, please see the LICENSE.txt
|
||||
* Redistributions of files must retain the above copyright notice.
|
||||
*
|
||||
* @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
|
||||
* @link https://cakephp.org CakePHP(tm) Project
|
||||
* @since 2.0.0
|
||||
* @license https://www.opensource.org/licenses/mit-license.php MIT License
|
||||
*/
|
||||
#}
|
||||
{{ element('Bake.file_header', {
|
||||
namespace: "#{namespace}\\View\\Helper",
|
||||
classImports: [
|
||||
'Cake\\View\\Helper',
|
||||
'Cake\\View\\View',
|
||||
],
|
||||
}) }}
|
||||
|
||||
/**
|
||||
* {{ name }} helper
|
||||
*/
|
||||
class {{ name }}Helper extends Helper
|
||||
{
|
||||
/**
|
||||
* Default configuration.
|
||||
*
|
||||
* @var array<string, mixed>
|
||||
*/
|
||||
protected array $_defaultConfig = [];
|
||||
}
|
||||
|
|
@ -0,0 +1,45 @@
|
|||
{#
|
||||
/**
|
||||
* CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
|
||||
* Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* For full copyright and license information, please see the LICENSE.txt
|
||||
* Redistributions of files must retain the above copyright notice.
|
||||
*
|
||||
* @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
|
||||
* @link https://cakephp.org CakePHP(tm) Project
|
||||
* @since 2.0.0
|
||||
* @license https://www.opensource.org/licenses/mit-license.php MIT License
|
||||
*/
|
||||
#}
|
||||
{% set compact = ["'#{singularName}'"] %}
|
||||
/**
|
||||
* Add method
|
||||
*
|
||||
* @return \Cake\Http\Response|null|void Redirects on successful add, renders view otherwise.
|
||||
*/
|
||||
public function add()
|
||||
{
|
||||
${{ singularName }} = $this->{{ currentModelName }}->newEmptyEntity();
|
||||
if ($this->request->is('post')) {
|
||||
${{ singularName }} = $this->{{ currentModelName }}->patchEntity(${{ singularName }}, $this->request->getData());
|
||||
if ($this->{{ currentModelName }}->save(${{ singularName }})) {
|
||||
$this->Flash->success(__('The {{ singularHumanName|lower }} has been saved.'));
|
||||
|
||||
return $this->redirect(['action' => 'index']);
|
||||
}
|
||||
$this->Flash->error(__('The {{ singularHumanName|lower }} could not be saved. Please, try again.'));
|
||||
}
|
||||
{% set associations = Bake.aliasExtractor(modelObj, 'BelongsTo') %}
|
||||
{% set associations = associations|merge(Bake.aliasExtractor(modelObj, 'BelongsToMany')) %}
|
||||
|
||||
{%- for assoc in associations %}
|
||||
{%- set otherName = Bake.getAssociatedTableAlias(modelObj, assoc) %}
|
||||
{%- set otherPlural = otherName|variable %}
|
||||
${{ otherPlural }} = $this->{{ currentModelName }}->{{ otherName }}->find('list', limit: 200)->all();
|
||||
{{- "\n" }}
|
||||
{%- set compact = compact|merge(["'#{otherPlural}'"]) %}
|
||||
{% endfor %}
|
||||
$this->set(compact({{ compact|join(', ')|raw }}));
|
||||
}
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
{#
|
||||
/**
|
||||
* CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
|
||||
* Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* For full copyright and license information, please see the LICENSE.txt
|
||||
* Redistributions of files must retain the above copyright notice.
|
||||
*
|
||||
* @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
|
||||
* @link https://cakephp.org CakePHP(tm) Project
|
||||
* @since 2.0.0
|
||||
* @license https://www.opensource.org/licenses/mit-license.php MIT License
|
||||
*/
|
||||
#}
|
||||
/**
|
||||
* Delete method
|
||||
*
|
||||
* @param string|null $id {{ singularHumanName }} id.
|
||||
* @return \Cake\Http\Response|null Redirects to index.
|
||||
* @throws \Cake\Datasource\Exception\RecordNotFoundException When record not found.
|
||||
*/
|
||||
public function delete($id = null)
|
||||
{
|
||||
$this->request->allowMethod(['post', 'delete']);
|
||||
${{ singularName }} = $this->{{ currentModelName }}->get($id);
|
||||
if ($this->{{ currentModelName }}->delete(${{ singularName }})) {
|
||||
$this->Flash->success(__('The {{ singularHumanName|lower }} has been deleted.'));
|
||||
} else {
|
||||
$this->Flash->error(__('The {{ singularHumanName|lower }} could not be deleted. Please, try again.'));
|
||||
}
|
||||
|
||||
return $this->redirect(['action' => 'index']);
|
||||
}
|
||||
|
|
@ -0,0 +1,46 @@
|
|||
{#
|
||||
/**
|
||||
* CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
|
||||
* Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* For full copyright and license information, please see the LICENSE.txt
|
||||
* Redistributions of files must retain the above copyright notice.
|
||||
*
|
||||
* @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
|
||||
* @link https://cakephp.org CakePHP(tm) Project
|
||||
* @since 2.0.0
|
||||
* @license https://www.opensource.org/licenses/mit-license.php MIT License
|
||||
*/
|
||||
#}
|
||||
{% set belongsTo = Bake.aliasExtractor(modelObj, 'BelongsTo') %}
|
||||
{% set belongsToMany = Bake.aliasExtractor(modelObj, 'belongsToMany') %}
|
||||
{% set compact = ["'#{singularName}'"] %}
|
||||
/**
|
||||
* Edit method
|
||||
*
|
||||
* @param string|null $id {{ singularHumanName }} id.
|
||||
* @return \Cake\Http\Response|null|void Redirects on successful edit, renders view otherwise.
|
||||
* @throws \Cake\Datasource\Exception\RecordNotFoundException When record not found.
|
||||
*/
|
||||
public function edit($id = null)
|
||||
{
|
||||
${{ singularName }} = $this->{{ currentModelName }}->get($id, contain: {{ Bake.exportArray(belongsToMany)|raw }});
|
||||
if ($this->request->is(['patch', 'post', 'put'])) {
|
||||
${{ singularName }} = $this->{{ currentModelName }}->patchEntity(${{ singularName }}, $this->request->getData());
|
||||
if ($this->{{ currentModelName }}->save(${{ singularName }})) {
|
||||
$this->Flash->success(__('The {{ singularHumanName|lower }} has been saved.'));
|
||||
|
||||
return $this->redirect(['action' => 'index']);
|
||||
}
|
||||
$this->Flash->error(__('The {{ singularHumanName|lower }} could not be saved. Please, try again.'));
|
||||
}
|
||||
{% for assoc in belongsTo|merge(belongsToMany) %}
|
||||
{%- set otherName = Bake.getAssociatedTableAlias(modelObj, assoc) %}
|
||||
{%- set otherPlural = otherName|variable %}
|
||||
${{ otherPlural }} = $this->{{ currentModelName }}->{{ otherName }}->find('list', limit: 200)->all();
|
||||
{{- "\n" }}
|
||||
{%- set compact = compact|merge(["'#{otherPlural}'"]) %}
|
||||
{% endfor %}
|
||||
$this->set(compact({{ compact|join(', ')|raw }}));
|
||||
}
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
{#
|
||||
/**
|
||||
* CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
|
||||
* Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* For full copyright and license information, please see the LICENSE.txt
|
||||
* Redistributions of files must retain the above copyright notice.
|
||||
*
|
||||
* @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
|
||||
* @link https://cakephp.org CakePHP(tm) Project
|
||||
* @since 2.0.0
|
||||
* @license https://www.opensource.org/licenses/mit-license.php MIT License
|
||||
*/
|
||||
#}
|
||||
/**
|
||||
* Index method
|
||||
*
|
||||
* @return \Cake\Http\Response|null|void Renders view
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
{% set belongsTo = Bake.aliasExtractor(modelObj, 'BelongsTo') %}
|
||||
{% if belongsTo %}
|
||||
$query = $this->{{ currentModelName }}->find()
|
||||
->contain({{ Bake.exportArray(belongsTo)|raw }});
|
||||
{% else %}
|
||||
$query = $this->{{ currentModelName }}->find();
|
||||
{% endif %}
|
||||
${{ pluralName }} = $this->paginate($query);
|
||||
|
||||
$this->set(compact('{{ pluralName }}'));
|
||||
}
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
{#
|
||||
/**
|
||||
* CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
|
||||
* Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* For full copyright and license information, please see the LICENSE.txt
|
||||
* Redistributions of files must retain the above copyright notice.
|
||||
*
|
||||
* @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
|
||||
* @link https://cakephp.org CakePHP(tm) Project
|
||||
* @since 2.0.0
|
||||
* @license https://www.opensource.org/licenses/mit-license.php MIT License
|
||||
*/
|
||||
#}
|
||||
{% set allAssociations = Bake.aliasExtractor(modelObj, 'BelongsTo') %}
|
||||
{% set allAssociations = allAssociations|merge(Bake.aliasExtractor(modelObj, 'BelongsToMany')) %}
|
||||
{% set allAssociations = allAssociations|merge(Bake.aliasExtractor(modelObj, 'HasOne')) %}
|
||||
{% set allAssociations = allAssociations|merge(Bake.aliasExtractor(modelObj, 'HasMany')) %}
|
||||
/**
|
||||
* View method
|
||||
*
|
||||
* @param string|null $id {{ singularHumanName }} id.
|
||||
* @return \Cake\Http\Response|null|void Renders view
|
||||
* @throws \Cake\Datasource\Exception\RecordNotFoundException When record not found.
|
||||
*/
|
||||
public function view($id = null)
|
||||
{
|
||||
${{ singularName }} = $this->{{ currentModelName }}->get($id, contain: {{ Bake.exportArray(allAssociations)|raw }});
|
||||
$this->set(compact('{{ singularName }}'));
|
||||
}
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
/**
|
||||
* {{ name|humanize }}
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public array ${{ name }} = {{ Bake.exportArray(value)|raw }};
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
<?php
|
||||
declare(strict_types=1);
|
||||
{{- namespace ? "\n\nnamespace #{namespace};" : '' }}
|
||||
{{- Bake.concat('\n', [Bake.classUses(classImports ?? []), Bake.functionUses(functionImports ?? []), Bake.constUses(constImports ?? [])], '\n\n') }}
|
||||
|
|
@ -0,0 +1,75 @@
|
|||
{#
|
||||
/**
|
||||
* CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
|
||||
* Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* For full copyright and license information, please see the LICENSE.txt
|
||||
* Redistributions of files must retain the above copyright notice.
|
||||
*
|
||||
* @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
|
||||
* @link https://cakephp.org CakePHP(tm) Project
|
||||
* @since 2.0.0
|
||||
* @license https://www.opensource.org/licenses/mit-license.php MIT License
|
||||
*/
|
||||
#}
|
||||
{% set fields = Bake.filterFields(fields, schema, modelObject) %}
|
||||
<div class="row">
|
||||
<aside class="column">
|
||||
<div class="side-nav">
|
||||
<h4 class="heading"><?= __('Actions') ?></h4>
|
||||
{% if 'add' not in action %}
|
||||
<?= $this->Form->postLink(
|
||||
__('Delete'),
|
||||
['action' => 'delete', ${{ singularVar }}->{{ primaryKey[0] }}],
|
||||
['confirm' => __('Are you sure you want to delete # {0}?', ${{ singularVar }}->{{ primaryKey[0] }}), 'class' => 'side-nav-item']
|
||||
) ?>
|
||||
{% endif %}
|
||||
<?= $this->Html->link(__('List {{ pluralHumanName }}'), ['action' => 'index'], ['class' => 'side-nav-item']) ?>
|
||||
{{- "\n" }}
|
||||
{%- set done = [] %}
|
||||
</div>
|
||||
</aside>
|
||||
<div class="column column-80">
|
||||
<div class="{{ pluralVar }} form content">
|
||||
<?= $this->Form->create(${{ singularVar }}) ?>
|
||||
<fieldset>
|
||||
<legend><?= __('{{ action|humanize }} {{ singularHumanName }}') ?></legend>
|
||||
<?php
|
||||
{% for field in fields %}
|
||||
{%- if field not in primaryKey %}
|
||||
{%- if keyFields[field] is defined %}
|
||||
{%- set fieldData = Bake.columnData(field, schema) %}
|
||||
{%- if fieldData.null %}
|
||||
echo $this->Form->control('{{ field }}', ['options' => ${{ keyFields[field] }}, 'empty' => true]);
|
||||
{{- "\n" }}
|
||||
{%- else %}
|
||||
echo $this->Form->control('{{ field }}', ['options' => ${{ keyFields[field] }}]);
|
||||
{{- "\n" }}
|
||||
{%- endif %}
|
||||
{%- elseif field not in ['created', 'modified', 'updated'] %}
|
||||
{%- set fieldData = Bake.columnData(field, schema) %}
|
||||
{%- if fieldData.type in ['date', 'datetime', 'time'] and fieldData.null %}
|
||||
echo $this->Form->control('{{ field }}', ['empty' => true]);
|
||||
{{- "\n" }}
|
||||
{%- else %}
|
||||
echo $this->Form->control('{{ field }}');
|
||||
{{- "\n" }}
|
||||
{%- endif %}
|
||||
{%- endif %}
|
||||
{%- endif %}
|
||||
{%- endfor %}
|
||||
|
||||
{%- if associations.BelongsToMany is defined %}
|
||||
{%- for assocName, assocData in associations.BelongsToMany %}
|
||||
echo $this->Form->control('{{ assocData.property }}._ids', ['options' => ${{ assocData.variable }}]);
|
||||
{{- "\n" }}
|
||||
{%- endfor %}
|
||||
{% endif %}
|
||||
?>
|
||||
</fieldset>
|
||||
<?= $this->Form->button(__('Submit')) ?>
|
||||
<?= $this->Form->end() ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
{#
|
||||
/**
|
||||
* CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
|
||||
* Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* For full copyright and license information, please see the LICENSE.txt
|
||||
* Redistributions of files must retain the above copyright notice.
|
||||
*
|
||||
* @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
|
||||
* @link https://cakephp.org CakePHP(tm) Project
|
||||
* @since 2.0.0
|
||||
* @license https://www.opensource.org/licenses/mit-license.php MIT License
|
||||
*/
|
||||
#}
|
||||
{{ fetch('content') }}
|
||||
|
|
@ -0,0 +1,74 @@
|
|||
{#
|
||||
/**
|
||||
* Fixture Template file
|
||||
*
|
||||
* Fixture Template used when baking fixtures with bake
|
||||
*
|
||||
* CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
|
||||
* Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* For full copyright and license information, please see the LICENSE.txt
|
||||
* Redistributions of files must retain the above copyright notice.
|
||||
*
|
||||
* @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
|
||||
* @link https://cakephp.org CakePHP(tm) Project
|
||||
* @since 2.0.0
|
||||
* @license https://www.opensource.org/licenses/mit-license.php MIT License
|
||||
*/
|
||||
#}
|
||||
{{ element('Bake.file_header', {
|
||||
namespace: "#{namespace}\\Test\\Fixture",
|
||||
classImports: [
|
||||
'Cake\\TestSuite\\Fixture\\TestFixture',
|
||||
],
|
||||
}) }}
|
||||
|
||||
/**
|
||||
* {{ name }}Fixture
|
||||
*/
|
||||
class {{ name }}Fixture extends TestFixture
|
||||
{
|
||||
{% if table %}
|
||||
/**
|
||||
* Table name
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public string $table = '{{ table|raw }}';
|
||||
{% endif %}
|
||||
|
||||
{%- if import %}
|
||||
/**
|
||||
* Import
|
||||
*
|
||||
* @var array<string, mixed>
|
||||
*/
|
||||
public array $import = {{ import|raw }};
|
||||
|
||||
{% endif %}
|
||||
|
||||
{%- if schema %}
|
||||
/**
|
||||
* Fields
|
||||
*
|
||||
* @var array<string, mixed>
|
||||
*/
|
||||
// phpcs:disable
|
||||
public array $fields = {{ schema|raw }};
|
||||
// phpcs:enable
|
||||
{% endif %}
|
||||
|
||||
{%- if records %}
|
||||
/**
|
||||
* Init method
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function init(): void
|
||||
{
|
||||
$this->records = {{ records|raw }};
|
||||
parent::init();
|
||||
}
|
||||
{% endif %}
|
||||
}
|
||||
|
|
@ -0,0 +1,569 @@
|
|||
{#
|
||||
/**
|
||||
* Test Case bake template
|
||||
*
|
||||
* CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
|
||||
* Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* For full copyright and license information, please see the LICENSE.txt
|
||||
* Redistributions of files must retain the above copyright notice.
|
||||
*
|
||||
* @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
|
||||
* @link https://cakephp.org CakePHP(tm) Project
|
||||
* @since 2.0.0
|
||||
* @license https://www.opensource.org/licenses/mit-license.php MIT License
|
||||
*/
|
||||
#}
|
||||
{% set isController = type|lower == 'controller' %}
|
||||
{% set isPlugin = 'app'|lower == 'app' %}
|
||||
{% set isTable = type|lower == 'table' or type|lower == 'model/table' %}
|
||||
{% set isCommand = type|lower == 'command' %}
|
||||
{% if isController %}
|
||||
{%- set traitName = 'IntegrationTestTrait' %}
|
||||
{%- set uses = uses|merge(['Cake\\TestSuite\\IntegrationTestTrait', 'PHPUnit\\Exception']) %}
|
||||
{% elseif isCommand %}
|
||||
{%- set traitName = 'ConsoleIntegrationTestTrait' %}
|
||||
{%- set uses = uses|merge(['Cake\\Console\\TestSuite\\ConsoleIntegrationTestTrait']) %}
|
||||
{% endif %}
|
||||
{%- set uses = uses|merge(["Cake\\TestSuite\\TestCase"]) %}
|
||||
|
||||
{{- element('Bake.file_header', {
|
||||
namespace: "#{baseNamespace}\\Test\\TestCase\\#{subNamespace}",
|
||||
classImports: uses,
|
||||
}) }}
|
||||
|
||||
/**
|
||||
* {{ fullClassName }} Test Case
|
||||
{% if isController or isCommand %}
|
||||
*
|
||||
* @uses \{{ fullClassName }}
|
||||
{% endif %}
|
||||
*/
|
||||
class {{ className }}Test extends TestCase
|
||||
{
|
||||
{% if traitName is defined %}
|
||||
use {{ traitName }};
|
||||
{% if properties or fixtures or construction or methods %}
|
||||
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% if properties %}
|
||||
{% for propertyInfo in properties %}
|
||||
{% if loop.index > 1 %}
|
||||
|
||||
{% endif %}
|
||||
/**
|
||||
* {{ propertyInfo.description }}
|
||||
*
|
||||
* @var {{ propertyInfo.type }}
|
||||
*/
|
||||
protected ${{ propertyInfo.name }}{% if propertyInfo.value is defined and propertyInfo.value %} = {{ propertyInfo.value }}{% endif %};
|
||||
{% if loop.last and (fixtures or construction or methods) %}
|
||||
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
{%- if fixtures %}
|
||||
/**
|
||||
* Fixtures
|
||||
*
|
||||
* @var array<string>
|
||||
*/
|
||||
protected array $fixtures = {{ Bake.exportVar(fixtures|values, 1)|raw }};
|
||||
{% if construction or methods %}
|
||||
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{%- if construction or isController %}
|
||||
/**
|
||||
* setUp method
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
{% if preConstruct %}
|
||||
{{ preConstruct|raw }}
|
||||
{% endif %}
|
||||
{% if isCommand %}
|
||||
{{ construction|raw }}
|
||||
{% elseif isController %}
|
||||
$this->{{ subject }} = $this->getTableLocator()->get('{{ subject }}');
|
||||
{% else %}
|
||||
$this->{{ (subject ~ ' = ' ~ construction)|raw }}
|
||||
{% endif %}
|
||||
{% if postConstruct %}
|
||||
{{ postConstruct|raw }}
|
||||
{% endif %}
|
||||
}
|
||||
{% if not isCommand %}
|
||||
|
||||
/**
|
||||
* tearDown method
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function tearDown(): void
|
||||
{
|
||||
unset($this->{{ subject }});
|
||||
|
||||
parent::tearDown();
|
||||
}
|
||||
{% if methods %}
|
||||
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{%- if isTable %}
|
||||
/**
|
||||
* TestInitialize method
|
||||
*
|
||||
* @return void
|
||||
* @uses \{{ fullClassName }}::initialize()
|
||||
*/
|
||||
public function testInitialize(): void
|
||||
{
|
||||
// verify all associations loaded
|
||||
$expectedAssociations = [];
|
||||
$associations = $this->{{ subject}}->associations();
|
||||
|
||||
$this->assertCount(count($expectedAssociations), $associations);
|
||||
foreach ($expectedAssociations as $expectedAssociation) {
|
||||
$this->assertTrue($this->{{ subject }}->hasAssociation($expectedAssociation));
|
||||
}
|
||||
|
||||
// verify all behaviors loaded
|
||||
$expectedBehaviors = [];
|
||||
$behaviors = $this->{{ subject }}->behaviors();
|
||||
|
||||
$this->assertCount(count($expectedBehaviors), $behaviors);
|
||||
foreach ($expectedBehaviors as $expectedBehavior) {
|
||||
$this->assertTrue($this->{{ subject }}->hasBehavior($expectedBehavior));
|
||||
}
|
||||
}
|
||||
|
||||
{% endif %}
|
||||
{%- for method in methods %}
|
||||
{% if loop.index > 1 %}
|
||||
|
||||
{% endif %}
|
||||
{%- if isController and method|lower == 'index' %}
|
||||
/**
|
||||
* Test {{ method }} method
|
||||
*
|
||||
* Tests the {{ method }} action with an unauthenticated user (not logged in)
|
||||
*
|
||||
* @uses \{{ fullClassName }}::{{ method }}()
|
||||
* @throws Exception
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function test{{ method|camelize }}GetUnauthenticated(): void
|
||||
{
|
||||
$url = [
|
||||
{% if baseNamespace != 'App' %}
|
||||
'plugin' => '{{ baseNamespace }}',
|
||||
{% endif %}
|
||||
'controller' => '{{ subject }}',
|
||||
'action' => '{{ method|lower }}',
|
||||
];
|
||||
$this->get($url);
|
||||
$this->assertResponseCode(302);
|
||||
$this->assertRedirectContains('login');
|
||||
}
|
||||
|
||||
/**
|
||||
* Test {{ method }} method
|
||||
*
|
||||
* Tests the {{ method }} action with a logged in user
|
||||
*
|
||||
* @uses \{{ fullClassName }}::{{ method }}()
|
||||
* @throws Exception
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function test{{ method|camelize }}GetLoggedIn(): void
|
||||
{
|
||||
// $this->loginUserByRole('admin');
|
||||
$url = [
|
||||
{% if baseNamespace != 'App' %}
|
||||
'plugin' => '{{ baseNamespace }}',
|
||||
{% endif %}
|
||||
'controller' => '{{ subject }}',
|
||||
'action' => '{{ method|lower }}',
|
||||
];
|
||||
$this->get($url);
|
||||
$this->assertResponseCode(200);
|
||||
}
|
||||
{% endif %}
|
||||
{%- if isController and method|lower == 'view' %}
|
||||
/**
|
||||
* Test {{ method }} method
|
||||
*
|
||||
* Tests the {{ method }} action with an unauthenticated user (not logged in)
|
||||
*
|
||||
* @uses \{{ fullClassName }}::{{ method }}()
|
||||
* @throws Exception
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function test{{ method|camelize }}GetUnauthenticated(): void
|
||||
{
|
||||
$id = 1;
|
||||
$url = [
|
||||
{% if baseNamespace != 'App' %}
|
||||
'plugin' => '{{ baseNamespace }}',
|
||||
{% endif %}
|
||||
'controller' => '{{ subject }}',
|
||||
'action' => '{{ method|lower }}',
|
||||
$id,
|
||||
];
|
||||
$this->get($url);
|
||||
$this->assertResponseCode(302);
|
||||
$this->assertRedirectContains('login');
|
||||
}
|
||||
|
||||
/**
|
||||
* Test {{ method }} method
|
||||
*
|
||||
* Tests the {{ method }} action with a logged in user
|
||||
*
|
||||
* @uses \{{ fullClassName }}::{{ method }}()
|
||||
* @throws Exception
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function test{{ method|camelize }}GetLoggedIn(): void
|
||||
{
|
||||
$id = 1;
|
||||
// $this->loginUserByRole('admin');
|
||||
$url = [
|
||||
{% if baseNamespace != 'App' %}
|
||||
'plugin' => '{{ baseNamespace }}',
|
||||
{% endif %}
|
||||
'controller' => '{{ subject }}',
|
||||
'action' => '{{ method|lower }}',
|
||||
$id,
|
||||
];
|
||||
$this->get($url);
|
||||
$this->assertResponseCode(200);
|
||||
}
|
||||
{% endif %}
|
||||
{%- if isController and method|lower == 'add' %}
|
||||
/**
|
||||
* Test {{ method }} method
|
||||
*
|
||||
* Tests the {{ method }} action with an unauthenticated user (not logged in)
|
||||
*
|
||||
* @uses \{{ fullClassName }}::{{ method }}()
|
||||
* @throws Exception
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function test{{ method|camelize }}GetUnauthenticated(): void
|
||||
{
|
||||
$cntBefore = $this->{{ subject }}->find()->count();
|
||||
$url = [
|
||||
{% if baseNamespace != 'App' %}
|
||||
'plugin' => '{{ baseNamespace }}',
|
||||
{% endif %}
|
||||
'controller' => '{{ subject }}',
|
||||
'action' => '{{ method|lower }}',
|
||||
];
|
||||
$this->get($url);
|
||||
$this->assertResponseCode(302);
|
||||
$this->assertRedirectContains('login');
|
||||
|
||||
$cntAfter = $this->{{ subject }}->find()->count();
|
||||
$this->assertEquals($cntBefore, $cntAfter);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test {{ method }} method
|
||||
*
|
||||
* Tests the {{ method }} action with a logged in user
|
||||
*
|
||||
* @uses \{{ fullClassName }}::{{ method }}()
|
||||
* @throws Exception
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function test{{ method|camelize }}GetLoggedIn(): void
|
||||
{
|
||||
$cntBefore = $this->{{ subject }}->find()->count();
|
||||
|
||||
// $this->loginUserByRole('admin');
|
||||
$url = [
|
||||
{% if baseNamespace != 'App' %}
|
||||
'plugin' => '{{ baseNamespace }}',
|
||||
{% endif %}
|
||||
'controller' => '{{ subject }}',
|
||||
'action' => '{{ method|lower }}',
|
||||
];
|
||||
$this->get($url);
|
||||
$this->assertResponseCode(200);
|
||||
|
||||
$cntAfter = $this->{{ subject }}->find()->count();
|
||||
$this->assertEquals($cntBefore, $cntAfter);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test {{ method }} method
|
||||
*
|
||||
* Tests a POST request to the {{ method }} action with a logged in user
|
||||
*
|
||||
* @uses \{{ fullClassName }}::{{ method }}()
|
||||
* @throws Exception
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function test{{ method|camelize }}PostLoggedInSuccess(): void
|
||||
{
|
||||
$cntBefore = $this->{{ subject }}->find()->count();
|
||||
|
||||
// $this->loginUserByRole('admin');
|
||||
$url = [
|
||||
{% if baseNamespace != 'App' %}
|
||||
'plugin' => '{{ baseNamespace }}',
|
||||
{% endif %}
|
||||
'controller' => '{{ subject }}',
|
||||
'action' => '{{ method|lower }}',
|
||||
];
|
||||
$data = [];
|
||||
$this->post($url, $data);
|
||||
$this->assertResponseCode(302);
|
||||
$this->assertRedirectContains('{{ subject|lower }}/view');
|
||||
|
||||
$cntAfter = $this->{{ subject }}->find()->count();
|
||||
$this->assertEquals($cntBefore + 1, $cntAfter);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test {{ method }} method
|
||||
*
|
||||
* Tests a POST request to the {{ method }} action with a logged in user
|
||||
*
|
||||
* @uses \{{ fullClassName }}::{{ method }}()
|
||||
* @throws Exception
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function test{{ method|camelize }}PostLoggedInFailure(): void
|
||||
{
|
||||
$cntBefore = $this->{{ subject }}->find()->count();
|
||||
|
||||
// $this->loginUserByRole('admin');
|
||||
$url = [
|
||||
{% if baseNamespace != 'App' %}
|
||||
'plugin' => '{{ baseNamespace }}',
|
||||
{% endif %}
|
||||
'controller' => '{{ subject }}',
|
||||
'action' => '{{ method|lower }}',
|
||||
];
|
||||
$data = [];
|
||||
$this->post($url, $data);
|
||||
$this->assertResponseCode(200);
|
||||
|
||||
$cntAfter = $this->{{ subject }}->find()->count();
|
||||
$this->assertEquals($cntBefore, $cntAfter);
|
||||
}
|
||||
{% endif %}
|
||||
{%- if isController and method|lower == 'edit' %}
|
||||
/**
|
||||
* Test {{ method }} method
|
||||
*
|
||||
* Tests the {{ method }} action with an unauthenticated user (not logged in)
|
||||
*
|
||||
* @uses \{{ fullClassName }}::{{ method }}()
|
||||
* @throws Exception
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function test{{ method|camelize }}GetUnauthenticated(): void
|
||||
{
|
||||
$url = [
|
||||
{% if baseNamespace != 'App' %}
|
||||
'plugin' => '{{ baseNamespace }}',
|
||||
{% endif %}
|
||||
'controller' => '{{ subject }}',
|
||||
'action' => '{{ method|lower }}',
|
||||
1,
|
||||
];
|
||||
$this->get($url);
|
||||
$this->assertResponseCode(302);
|
||||
$this->assertRedirectContains('login');
|
||||
}
|
||||
|
||||
/**
|
||||
* Test {{ method }} method
|
||||
*
|
||||
* Tests the {{ method }} action with a logged in user
|
||||
*
|
||||
* @uses \{{ fullClassName }}::{{ method }}()
|
||||
* @throws Exception
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function test{{ method|camelize }}GetLoggedIn(): void
|
||||
{
|
||||
// $this->loginUserByRole('admin');
|
||||
$url = [
|
||||
{% if baseNamespace != 'App' %}
|
||||
'plugin' => '{{ baseNamespace }}',
|
||||
{% endif %}
|
||||
'controller' => '{{ subject }}',
|
||||
'action' => '{{ method|lower }}',
|
||||
1,
|
||||
];
|
||||
$this->get($url);
|
||||
$this->assertResponseCode(200);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test {{ method }} method
|
||||
*
|
||||
* Tests a PUT request to the {{ method }} action with a logged in user
|
||||
*
|
||||
* @uses \{{ fullClassName }}::{{ method }}()
|
||||
* @throws Exception
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function test{{ method|camelize }}PutLoggedInSuccess(): void
|
||||
{
|
||||
// $this->loginUserByRole('admin');
|
||||
$id = 1;
|
||||
$before = $this->{{ subject }}->get($id);
|
||||
$url = [
|
||||
{% if baseNamespace != 'App' %}
|
||||
'plugin' => '{{ baseNamespace }}',
|
||||
{% endif %}
|
||||
'controller' => '{{ subject }}',
|
||||
'action' => '{{ method|lower }}',
|
||||
$id,
|
||||
];
|
||||
$data = [
|
||||
// test new data here
|
||||
];
|
||||
$this->put($url, $data);
|
||||
|
||||
$this->assertResponseCode(302);
|
||||
$this->assertRedirectContains('{{ subject|lower }}/view');
|
||||
|
||||
$after = $this->{{ subject }}->get($id);
|
||||
// assert saved properly below
|
||||
}
|
||||
|
||||
/**
|
||||
* Test {{ method }} method
|
||||
*
|
||||
* Tests a PUT request to the {{ method }} action with a logged in user
|
||||
*
|
||||
* @uses \{{ fullClassName }}::{{ method }}()
|
||||
* @throws Exception
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function test{{ method|camelize }}PutLoggedInFailure(): void
|
||||
{
|
||||
// $this->loginUserByRole('admin');
|
||||
$id = 1;
|
||||
$before = $this->{{ subject }}->get($id);
|
||||
$url = [
|
||||
{% if baseNamespace != 'App' %}
|
||||
'plugin' => '{{ baseNamespace }}',
|
||||
{% endif %}
|
||||
'controller' => '{{ subject }}',
|
||||
'action' => '{{ method|lower }}',
|
||||
$id,
|
||||
];
|
||||
$data = [];
|
||||
$this->put($url, $data);
|
||||
$this->assertResponseCode(200);
|
||||
$after = $this->{{ subject }}->get($id);
|
||||
|
||||
// assert save failed below
|
||||
}
|
||||
{% endif %}
|
||||
{%- if isController and method|lower == 'delete' %}
|
||||
/**
|
||||
* Test {{ method }} method
|
||||
*
|
||||
* Tests the {{ method }} action with an unauthenticated user (not logged in)
|
||||
*
|
||||
* @uses \{{ fullClassName }}::{{ method }}()
|
||||
* @throws Exception
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function test{{ method|camelize }}Unauthenticated(): void
|
||||
{
|
||||
$cntBefore = $this->{{ subject }}->find()->count();
|
||||
|
||||
$url = [
|
||||
{% if baseNamespace != 'App' %}
|
||||
'plugin' => '{{ baseNamespace }}',
|
||||
{% endif %}
|
||||
'controller' => '{{ subject }}',
|
||||
'action' => '{{ method|lower }}',
|
||||
1,
|
||||
];
|
||||
$this->delete($url);
|
||||
$this->assertResponseCode(302);
|
||||
$this->assertRedirectContains('login');
|
||||
|
||||
$cntAfter = $this->{{ subject }}->find()->count();
|
||||
$this->assertEquals($cntBefore, $cntAfter);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test {{ method }} method
|
||||
*
|
||||
* Tests the {{ method }} action with a logged in user
|
||||
*
|
||||
* @uses \{{ fullClassName }}::{{ method }}()
|
||||
* @throws Exception
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function test{{ method|camelize }}LoggedIn(): void
|
||||
{
|
||||
$cntBefore = $this->{{ subject }}->find()->count();
|
||||
|
||||
// $this->loginUserByRole('admin');
|
||||
$url = [
|
||||
{% if baseNamespace != 'App' %}
|
||||
'plugin' => '{{ baseNamespace }}',
|
||||
{% endif %}
|
||||
'controller' => '{{ subject }}',
|
||||
'action' => '{{ method|lower }}',
|
||||
1,
|
||||
];
|
||||
$this->delete($url);
|
||||
$this->assertResponseCode(302);
|
||||
$this->assertRedirectContains('{{ subject|lower }}');
|
||||
|
||||
$cntAfter = $this->{{ subject }}->find()->count();
|
||||
$this->assertEquals($cntBefore - 1, $cntAfter);
|
||||
}
|
||||
{% endif %}
|
||||
{%- if isController and (method|lower == 'index' or method|lower == 'view' or method|lower == 'add' or method|lower == 'edit' or method|lower == 'delete') %}
|
||||
{% else %}
|
||||
/**
|
||||
* Test {{ method }} method
|
||||
*
|
||||
* @return void
|
||||
* @uses \{{ fullClassName }}::{{ method }}()
|
||||
*/
|
||||
public function test{{ method|camelize }}(): void
|
||||
{
|
||||
$this->markTestIncomplete('Not implemented yet.');
|
||||
}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
}
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
/**
|
||||
* @var \App\View\AppView $this
|
||||
* @var string|null $class
|
||||
* @var int|null $size
|
||||
*/
|
||||
|
||||
$size = $size ?? 6;
|
||||
$class = $class ?? '';
|
||||
?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true" data-slot="icon" class="size-<?= $size ?? 6; ?> <?= $class ?? ''; ?>">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M4.26 10.147a60.438 60.438 0 0 0-.491 6.347A48.62 48.62 0 0 1 12 20.904a48.62 48.62 0 0 1 8.232-4.41 60.46 60.46 0 0 0-.491-6.347m-15.482 0a50.636 50.636 0 0 0-2.658-.813A59.906 59.906 0 0 1 12 3.493a59.903 59.903 0 0 1 10.399 5.84c-.896.248-1.783.52-2.658.814m-15.482 0A50.717 50.717 0 0 1 12 13.489a50.702 50.702 0 0 1 7.74-3.342M6.75 15a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Zm0 0v-3.675A55.378 55.378 0 0 1 12 8.443m-7.007 11.55A5.981 5.981 0 0 0 6.75 15.75v-1.5"/>
|
||||
</svg>
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
<?php
|
||||
/**
|
||||
* @var \App\View\AppView $this
|
||||
* @var string|null $class
|
||||
* @var int|null $size
|
||||
*/
|
||||
|
||||
$size = $size ?? 6;
|
||||
$class = $class ? '';
|
||||
?>
|
||||
<?php
|
||||
/**
|
||||
* @var \App\View\AppView $this
|
||||
* @var string|null $class
|
||||
* @var int|null $size
|
||||
*/
|
||||
|
||||
$size = $size ?? 6;
|
||||
$class = $class ?? '';
|
||||
?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true" data-slot="icon" class="size-<?= $size ?? 6; ?> <?= $class ?? ''; ?>">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M10.5 6h9.75M10.5 6a1.5 1.5 0 1 1-3 0m3 0a1.5 1.5 0 1 0-3 0M3.75 6H7.5m3 12h9.75m-9.75 0a1.5 1.5 0 0 1-3 0m3 0a1.5 1.5 0 0 0-3 0m-3.75 0H7.5m9-6h3.75m-3.75 0a1.5 1.5 0 0 1-3 0m3 0a1.5 1.5 0 0 0-3 0m-9.75 0h9.75"/>
|
||||
</svg>
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
/**
|
||||
* @var \App\View\AppView $this
|
||||
* @var string|null $class
|
||||
* @var int|null $size
|
||||
*/
|
||||
|
||||
$size = $size ?? 6;
|
||||
$class = $class ?? '';
|
||||
?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true" data-slot="icon" class="size-<?= $size ?? 6; ?> <?= $class ?? ''; ?>">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M6 13.5V3.75m0 9.75a1.5 1.5 0 0 1 0 3m0-3a1.5 1.5 0 0 0 0 3m0 3.75V16.5m12-3V3.75m0 9.75a1.5 1.5 0 0 1 0 3m0-3a1.5 1.5 0 0 0 0 3m0 3.75V16.5m-6-9V3.75m0 3.75a1.5 1.5 0 0 1 0 3m0-3a1.5 1.5 0 0 0 0 3m0 9.75V10.5"/>
|
||||
</svg>
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
<?php
|
||||
/**
|
||||
* @var \App\View\AppView $this
|
||||
* @var string|null $class
|
||||
* @var int|null $size
|
||||
*/
|
||||
|
||||
$size = $size ?? 6;
|
||||
$class = $class ? '';
|
||||
?>
|
||||
<?php
|
||||
/**
|
||||
* @var \App\View\AppView $this
|
||||
* @var string|null $class
|
||||
* @var int|null $size
|
||||
*/
|
||||
|
||||
$size = $size ?? 6;
|
||||
$class = $class ?? '';
|
||||
?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true" data-slot="icon" class="size-<?= $size ?? 6; ?> <?= $class ?? ''; ?>">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="m20.25 7.5-.625 10.632a2.25 2.25 0 0 1-2.247 2.118H6.622a2.25 2.25 0 0 1-2.247-2.118L3.75 7.5m8.25 3v6.75m0 0-3-3m3 3 3-3M3.375 7.5h17.25c.621 0 1.125-.504 1.125-1.125v-1.5c0-.621-.504-1.125-1.125-1.125H3.375c-.621 0-1.125.504-1.125 1.125v1.5c0 .621.504 1.125 1.125 1.125Z"/>
|
||||
</svg>
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
/**
|
||||
* @var \App\View\AppView $this
|
||||
* @var string|null $class
|
||||
* @var int|null $size
|
||||
*/
|
||||
|
||||
$size = $size ?? 6;
|
||||
$class = $class ?? '';
|
||||
?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true" data-slot="icon" class="size-<?= $size ?? 6; ?> <?= $class ?? ''; ?>">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="m20.25 7.5-.625 10.632a2.25 2.25 0 0 1-2.247 2.118H6.622a2.25 2.25 0 0 1-2.247-2.118L3.75 7.5m6 4.125 2.25 2.25m0 0 2.25 2.25M12 13.875l2.25-2.25M12 13.875l-2.25 2.25M3.375 7.5h17.25c.621 0 1.125-.504 1.125-1.125v-1.5c0-.621-.504-1.125-1.125-1.125H3.375c-.621 0-1.125.504-1.125 1.125v1.5c0 .621.504 1.125 1.125 1.125Z"/>
|
||||
</svg>
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
<?php
|
||||
/**
|
||||
* @var \App\View\AppView $this
|
||||
* @var string|null $class
|
||||
* @var int|null $size
|
||||
*/
|
||||
|
||||
$size = $size ?? 6;
|
||||
$class = $class ? '';
|
||||
?>
|
||||
<?php
|
||||
/**
|
||||
* @var \App\View\AppView $this
|
||||
* @var string|null $class
|
||||
* @var int|null $size
|
||||
*/
|
||||
|
||||
$size = $size ?? 6;
|
||||
$class = $class ?? '';
|
||||
?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true" data-slot="icon" class="size-<?= $size ?? 6; ?> <?= $class ?? ''; ?>">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="m20.25 7.5-.625 10.632a2.25 2.25 0 0 1-2.247 2.118H6.622a2.25 2.25 0 0 1-2.247-2.118L3.75 7.5M10 11.25h4M3.375 7.5h17.25c.621 0 1.125-.504 1.125-1.125v-1.5c0-.621-.504-1.125-1.125-1.125H3.375c-.621 0-1.125.504-1.125 1.125v1.5c0 .621.504 1.125 1.125 1.125Z"/>
|
||||
</svg>
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
/**
|
||||
* @var \App\View\AppView $this
|
||||
* @var string|null $class
|
||||
* @var int|null $size
|
||||
*/
|
||||
|
||||
$size = $size ?? 6;
|
||||
$class = $class ?? '';
|
||||
?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true" data-slot="icon" class="size-<?= $size ?? 6; ?> <?= $class ?? ''; ?>">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="m9 12.75 3 3m0 0 3-3m-3 3v-7.5M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"/>
|
||||
</svg>
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
/**
|
||||
* @var \App\View\AppView $this
|
||||
* @var string|null $class
|
||||
* @var int|null $size
|
||||
*/
|
||||
|
||||
$size = $size ?? 6;
|
||||
$class = $class ?? '';
|
||||
?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true" data-slot="icon" class="size-<?= $size ?? 6; ?> <?= $class ?? ''; ?>">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="m19.5 4.5-15 15m0 0h11.25m-11.25 0V8.25"/>
|
||||
</svg>
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
/**
|
||||
* @var \App\View\AppView $this
|
||||
* @var string|null $class
|
||||
* @var int|null $size
|
||||
*/
|
||||
|
||||
$size = $size ?? 6;
|
||||
$class = $class ?? '';
|
||||
?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true" data-slot="icon" class="size-<?= $size ?? 6; ?> <?= $class ?? ''; ?>">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M7.5 7.5h-.75A2.25 2.25 0 0 0 4.5 9.75v7.5a2.25 2.25 0 0 0 2.25 2.25h7.5a2.25 2.25 0 0 0 2.25-2.25v-7.5a2.25 2.25 0 0 0-2.25-2.25h-.75m-6 3.75 3 3m0 0 3-3m-3 3V1.5m6 9h.75a2.25 2.25 0 0 1 2.25 2.25v7.5a2.25 2.25 0 0 1-2.25 2.25h-7.5a2.25 2.25 0 0 1-2.25-2.25v-.75"/>
|
||||
</svg>
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
/**
|
||||
* @var \App\View\AppView $this
|
||||
* @var string|null $class
|
||||
* @var int|null $size
|
||||
*/
|
||||
|
||||
$size = $size ?? 6;
|
||||
$class = $class ?? '';
|
||||
?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true" data-slot="icon" class="size-<?= $size ?? 6; ?> <?= $class ?? ''; ?>">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M9 8.25H7.5a2.25 2.25 0 0 0-2.25 2.25v9a2.25 2.25 0 0 0 2.25 2.25h9a2.25 2.25 0 0 0 2.25-2.25v-9a2.25 2.25 0 0 0-2.25-2.25H15M9 12l3 3m0 0 3-3m-3 3V2.25"/>
|
||||
</svg>
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
/**
|
||||
* @var \App\View\AppView $this
|
||||
* @var string|null $class
|
||||
* @var int|null $size
|
||||
*/
|
||||
|
||||
$size = $size ?? 6;
|
||||
$class = $class ?? '';
|
||||
?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true" data-slot="icon" class="size-<?= $size ?? 6; ?> <?= $class ?? ''; ?>">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="m4.5 4.5 15 15m0 0V8.25m0 11.25H8.25"/>
|
||||
</svg>
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
/**
|
||||
* @var \App\View\AppView $this
|
||||
* @var string|null $class
|
||||
* @var int|null $size
|
||||
*/
|
||||
|
||||
$size = $size ?? 6;
|
||||
$class = $class ?? '';
|
||||
?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true" data-slot="icon" class="size-<?= $size ?? 6; ?> <?= $class ?? ''; ?>">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M3 16.5v2.25A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75V16.5M16.5 12 12 16.5m0 0L7.5 12m4.5 4.5V3"/>
|
||||
</svg>
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
/**
|
||||
* @var \App\View\AppView $this
|
||||
* @var string|null $class
|
||||
* @var int|null $size
|
||||
*/
|
||||
|
||||
$size = $size ?? 6;
|
||||
$class = $class ?? '';
|
||||
?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true" data-slot="icon" class="size-<?= $size ?? 6; ?> <?= $class ?? ''; ?>">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M19.5 13.5 12 21m0 0-7.5-7.5M12 21V3"/>
|
||||
</svg>
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
/**
|
||||
* @var \App\View\AppView $this
|
||||
* @var string|null $class
|
||||
* @var int|null $size
|
||||
*/
|
||||
|
||||
$size = $size ?? 6;
|
||||
$class = $class ?? '';
|
||||
?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true" data-slot="icon" class="size-<?= $size ?? 6; ?> <?= $class ?? ''; ?>">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="m11.25 9-3 3m0 0 3 3m-3-3h7.5M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"/>
|
||||
</svg>
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
/**
|
||||
* @var \App\View\AppView $this
|
||||
* @var string|null $class
|
||||
* @var int|null $size
|
||||
*/
|
||||
|
||||
$size = $size ?? 6;
|
||||
$class = $class ?? '';
|
||||
?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true" data-slot="icon" class="size-<?= $size ?? 6; ?> <?= $class ?? ''; ?>">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M15.75 9V5.25A2.25 2.25 0 0 0 13.5 3h-6a2.25 2.25 0 0 0-2.25 2.25v13.5A2.25 2.25 0 0 0 7.5 21h6a2.25 2.25 0 0 0 2.25-2.25V15M12 9l-3 3m0 0 3 3m-3-3h12.75"/>
|
||||
</svg>
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
/**
|
||||
* @var \App\View\AppView $this
|
||||
* @var string|null $class
|
||||
* @var int|null $size
|
||||
*/
|
||||
|
||||
$size = $size ?? 6;
|
||||
$class = $class ?? '';
|
||||
?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true" data-slot="icon" class="size-<?= $size ?? 6; ?> <?= $class ?? ''; ?>">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M15.75 9V5.25A2.25 2.25 0 0 0 13.5 3h-6a2.25 2.25 0 0 0-2.25 2.25v13.5A2.25 2.25 0 0 0 7.5 21h6a2.25 2.25 0 0 0 2.25-2.25V15M12 9l-3 3m0 0 3 3m-3-3h12.75"/>
|
||||
</svg>
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
/**
|
||||
* @var \App\View\AppView $this
|
||||
* @var string|null $class
|
||||
* @var int|null $size
|
||||
*/
|
||||
|
||||
$size = $size ?? 6;
|
||||
$class = $class ?? '';
|
||||
?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true" data-slot="icon" class="size-<?= $size ?? 6; ?> <?= $class ?? ''; ?>">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M8.25 9V5.25A2.25 2.25 0 0 1 10.5 3h6a2.25 2.25 0 0 1 2.25 2.25v13.5A2.25 2.25 0 0 1 16.5 21h-6a2.25 2.25 0 0 1-2.25-2.25V15m-3 0-3-3m0 0 3-3m-3 3H15"/>
|
||||
</svg>
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
/**
|
||||
* @var \App\View\AppView $this
|
||||
* @var string|null $class
|
||||
* @var int|null $size
|
||||
*/
|
||||
|
||||
$size = $size ?? 6;
|
||||
$class = $class ?? '';
|
||||
?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true" data-slot="icon" class="size-<?= $size ?? 6; ?> <?= $class ?? ''; ?>">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M10.5 19.5 3 12m0 0 7.5-7.5M3 12h18"/>
|
||||
</svg>
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
/**
|
||||
* @var \App\View\AppView $this
|
||||
* @var string|null $class
|
||||
* @var int|null $size
|
||||
*/
|
||||
|
||||
$size = $size ?? 6;
|
||||
$class = $class ?? '';
|
||||
?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true" data-slot="icon" class="size-<?= $size ?? 6; ?> <?= $class ?? ''; ?>">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M15.75 17.25 12 21m0 0-3.75-3.75M12 21V3"/>
|
||||
</svg>
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
/**
|
||||
* @var \App\View\AppView $this
|
||||
* @var string|null $class
|
||||
* @var int|null $size
|
||||
*/
|
||||
|
||||
$size = $size ?? 6;
|
||||
$class = $class ?? '';
|
||||
?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true" data-slot="icon" class="size-<?= $size ?? 6; ?> <?= $class ?? ''; ?>">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M6.75 15.75 3 12m0 0 3.75-3.75M3 12h18"/>
|
||||
</svg>
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
/**
|
||||
* @var \App\View\AppView $this
|
||||
* @var string|null $class
|
||||
* @var int|null $size
|
||||
*/
|
||||
|
||||
$size = $size ?? 6;
|
||||
$class = $class ?? '';
|
||||
?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true" data-slot="icon" class="size-<?= $size ?? 6; ?> <?= $class ?? ''; ?>">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M17.25 8.25 21 12m0 0-3.75 3.75M21 12H3"/>
|
||||
</svg>
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
/**
|
||||
* @var \App\View\AppView $this
|
||||
* @var string|null $class
|
||||
* @var int|null $size
|
||||
*/
|
||||
|
||||
$size = $size ?? 6;
|
||||
$class = $class ?? '';
|
||||
?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true" data-slot="icon" class="size-<?= $size ?? 6; ?> <?= $class ?? ''; ?>">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M8.25 6.75 12 3m0 0 3.75 3.75M12 3v18"/>
|
||||
</svg>
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
/**
|
||||
* @var \App\View\AppView $this
|
||||
* @var string|null $class
|
||||
* @var int|null $size
|
||||
*/
|
||||
|
||||
$size = $size ?? 6;
|
||||
$class = $class ?? '';
|
||||
?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true" data-slot="icon" class="size-<?= $size ?? 6; ?> <?= $class ?? ''; ?>">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M19.5 12c0-1.232-.046-2.453-.138-3.662a4.006 4.006 0 0 0-3.7-3.7 48.678 48.678 0 0 0-7.324 0 4.006 4.006 0 0 0-3.7 3.7c-.017.22-.032.441-.046.662M19.5 12l3-3m-3 3-3-3m-12 3c0 1.232.046 2.453.138 3.662a4.006 4.006 0 0 0 3.7 3.7 48.656 48.656 0 0 0 7.324 0 4.006 4.006 0 0 0 3.7-3.7c.017-.22.032-.441.046-.662M4.5 12l3 3m-3-3-3 3"/>
|
||||
</svg>
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
/**
|
||||
* @var \App\View\AppView $this
|
||||
* @var string|null $class
|
||||
* @var int|null $size
|
||||
*/
|
||||
|
||||
$size = $size ?? 6;
|
||||
$class = $class ?? '';
|
||||
?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true" data-slot="icon" class="size-<?= $size ?? 6; ?> <?= $class ?? ''; ?>">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0 3.181 3.183a8.25 8.25 0 0 0 13.803-3.7M4.031 9.865a8.25 8.25 0 0 1 13.803-3.7l3.181 3.182m0-4.991v4.99"/>
|
||||
</svg>
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
/**
|
||||
* @var \App\View\AppView $this
|
||||
* @var string|null $class
|
||||
* @var int|null $size
|
||||
*/
|
||||
|
||||
$size = $size ?? 6;
|
||||
$class = $class ?? '';
|
||||
?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true" data-slot="icon" class="size-<?= $size ?? 6; ?> <?= $class ?? ''; ?>">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="m12.75 15 3-3m0 0-3-3m3 3h-7.5M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"/>
|
||||
</svg>
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
/**
|
||||
* @var \App\View\AppView $this
|
||||
* @var string|null $class
|
||||
* @var int|null $size
|
||||
*/
|
||||
|
||||
$size = $size ?? 6;
|
||||
$class = $class ?? '';
|
||||
?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true" data-slot="icon" class="size-<?= $size ?? 6; ?> <?= $class ?? ''; ?>">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M8.25 9V5.25A2.25 2.25 0 0 1 10.5 3h6a2.25 2.25 0 0 1 2.25 2.25v13.5A2.25 2.25 0 0 1 16.5 21h-6a2.25 2.25 0 0 1-2.25-2.25V15M12 9l3 3m0 0-3 3m3-3H2.25"/>
|
||||
</svg>
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
/**
|
||||
* @var \App\View\AppView $this
|
||||
* @var string|null $class
|
||||
* @var int|null $size
|
||||
*/
|
||||
|
||||
$size = $size ?? 6;
|
||||
$class = $class ?? '';
|
||||
?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true" data-slot="icon" class="size-<?= $size ?? 6; ?> <?= $class ?? ''; ?>">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M15.75 9V5.25A2.25 2.25 0 0 0 13.5 3h-6a2.25 2.25 0 0 0-2.25 2.25v13.5A2.25 2.25 0 0 0 7.5 21h6a2.25 2.25 0 0 0 2.25-2.25V15m3 0 3-3m0 0-3-3m3 3H9"/>
|
||||
</svg>
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
/**
|
||||
* @var \App\View\AppView $this
|
||||
* @var string|null $class
|
||||
* @var int|null $size
|
||||
*/
|
||||
|
||||
$size = $size ?? 6;
|
||||
$class = $class ?? '';
|
||||
?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true" data-slot="icon" class="size-<?= $size ?? 6; ?> <?= $class ?? ''; ?>">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M15.75 9V5.25A2.25 2.25 0 0 0 13.5 3h-6a2.25 2.25 0 0 0-2.25 2.25v13.5A2.25 2.25 0 0 0 7.5 21h6a2.25 2.25 0 0 0 2.25-2.25V15m3 0 3-3m0 0-3-3m3 3H9"/>
|
||||
</svg>
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
/**
|
||||
* @var \App\View\AppView $this
|
||||
* @var string|null $class
|
||||
* @var int|null $size
|
||||
*/
|
||||
|
||||
$size = $size ?? 6;
|
||||
$class = $class ?? '';
|
||||
?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true" data-slot="icon" class="size-<?= $size ?? 6; ?> <?= $class ?? ''; ?>">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M13.5 4.5 21 12m0 0-7.5 7.5M21 12H3"/>
|
||||
</svg>
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
/**
|
||||
* @var \App\View\AppView $this
|
||||
* @var string|null $class
|
||||
* @var int|null $size
|
||||
*/
|
||||
|
||||
$size = $size ?? 6;
|
||||
$class = $class ?? '';
|
||||
?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true" data-slot="icon" class="size-<?= $size ?? 6; ?> <?= $class ?? ''; ?>">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M12 4.5v15m0 0 6.75-6.75M12 19.5l-6.75-6.75"/>
|
||||
</svg>
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
/**
|
||||
* @var \App\View\AppView $this
|
||||
* @var string|null $class
|
||||
* @var int|null $size
|
||||
*/
|
||||
|
||||
$size = $size ?? 6;
|
||||
$class = $class ?? '';
|
||||
?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true" data-slot="icon" class="size-<?= $size ?? 6; ?> <?= $class ?? ''; ?>">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M19.5 12h-15m0 0 6.75 6.75M4.5 12l6.75-6.75"/>
|
||||
</svg>
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
/**
|
||||
* @var \App\View\AppView $this
|
||||
* @var string|null $class
|
||||
* @var int|null $size
|
||||
*/
|
||||
|
||||
$size = $size ?? 6;
|
||||
$class = $class ?? '';
|
||||
?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true" data-slot="icon" class="size-<?= $size ?? 6; ?> <?= $class ?? ''; ?>">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M4.5 12h15m0 0-6.75-6.75M19.5 12l-6.75 6.75"/>
|
||||
</svg>
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
/**
|
||||
* @var \App\View\AppView $this
|
||||
* @var string|null $class
|
||||
* @var int|null $size
|
||||
*/
|
||||
|
||||
$size = $size ?? 6;
|
||||
$class = $class ?? '';
|
||||
?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true" data-slot="icon" class="size-<?= $size ?? 6; ?> <?= $class ?? ''; ?>">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M12 19.5v-15m0 0-6.75 6.75M12 4.5l6.75 6.75"/>
|
||||
</svg>
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
/**
|
||||
* @var \App\View\AppView $this
|
||||
* @var string|null $class
|
||||
* @var int|null $size
|
||||
*/
|
||||
|
||||
$size = $size ?? 6;
|
||||
$class = $class ?? '';
|
||||
?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true" data-slot="icon" class="size-<?= $size ?? 6; ?> <?= $class ?? ''; ?>">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M13.5 6H5.25A2.25 2.25 0 0 0 3 8.25v10.5A2.25 2.25 0 0 0 5.25 21h10.5A2.25 2.25 0 0 0 18 18.75V10.5m-10.5 6L21 3m0 0h-5.25M21 3v5.25"/>
|
||||
</svg>
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
/**
|
||||
* @var \App\View\AppView $this
|
||||
* @var string|null $class
|
||||
* @var int|null $size
|
||||
*/
|
||||
|
||||
$size = $size ?? 6;
|
||||
$class = $class ?? '';
|
||||
?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true" data-slot="icon" class="size-<?= $size ?? 6; ?> <?= $class ?? ''; ?>">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M2.25 6 9 12.75l4.286-4.286a11.948 11.948 0 0 1 4.306 6.43l.776 2.898m0 0 3.182-5.511m-3.182 5.51-5.511-3.181"/>
|
||||
</svg>
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
/**
|
||||
* @var \App\View\AppView $this
|
||||
* @var string|null $class
|
||||
* @var int|null $size
|
||||
*/
|
||||
|
||||
$size = $size ?? 6;
|
||||
$class = $class ?? '';
|
||||
?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true" data-slot="icon" class="size-<?= $size ?? 6; ?> <?= $class ?? ''; ?>">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M2.25 18 9 11.25l4.306 4.306a11.95 11.95 0 0 1 5.814-5.518l2.74-1.22m0 0-5.94-2.281m5.94 2.28-2.28 5.941"/>
|
||||
</svg>
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
/**
|
||||
* @var \App\View\AppView $this
|
||||
* @var string|null $class
|
||||
* @var int|null $size
|
||||
*/
|
||||
|
||||
$size = $size ?? 6;
|
||||
$class = $class ?? '';
|
||||
?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true" data-slot="icon" class="size-<?= $size ?? 6; ?> <?= $class ?? ''; ?>">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="m7.49 12-3.75 3.75m0 0 3.75 3.75m-3.75-3.75h16.5V4.499"/>
|
||||
</svg>
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
/**
|
||||
* @var \App\View\AppView $this
|
||||
* @var string|null $class
|
||||
* @var int|null $size
|
||||
*/
|
||||
|
||||
$size = $size ?? 6;
|
||||
$class = $class ?? '';
|
||||
?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true" data-slot="icon" class="size-<?= $size ?? 6; ?> <?= $class ?? ''; ?>">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="m16.49 12 3.75 3.75m0 0-3.75 3.75m3.75-3.75H3.74V4.499"/>
|
||||
</svg>
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
/**
|
||||
* @var \App\View\AppView $this
|
||||
* @var string|null $class
|
||||
* @var int|null $size
|
||||
*/
|
||||
|
||||
$size = $size ?? 6;
|
||||
$class = $class ?? '';
|
||||
?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true" data-slot="icon" class="size-<?= $size ?? 6; ?> <?= $class ?? ''; ?>">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="m11.99 16.5-3.75 3.75m0 0L4.49 16.5m3.75 3.75V3.75h11.25"/>
|
||||
</svg>
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
/**
|
||||
* @var \App\View\AppView $this
|
||||
* @var string|null $class
|
||||
* @var int|null $size
|
||||
*/
|
||||
|
||||
$size = $size ?? 6;
|
||||
$class = $class ?? '';
|
||||
?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true" data-slot="icon" class="size-<?= $size ?? 6; ?> <?= $class ?? ''; ?>">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M11.99 7.5 8.24 3.75m0 0L4.49 7.5m3.75-3.75v16.499h11.25"/>
|
||||
</svg>
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
/**
|
||||
* @var \App\View\AppView $this
|
||||
* @var string|null $class
|
||||
* @var int|null $size
|
||||
*/
|
||||
|
||||
$size = $size ?? 6;
|
||||
$class = $class ?? '';
|
||||
?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true" data-slot="icon" class="size-<?= $size ?? 6; ?> <?= $class ?? ''; ?>">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="m11.99 16.5 3.75 3.75m0 0 3.75-3.75m-3.75 3.75V3.75H4.49"/>
|
||||
</svg>
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
/**
|
||||
* @var \App\View\AppView $this
|
||||
* @var string|null $class
|
||||
* @var int|null $size
|
||||
*/
|
||||
|
||||
$size = $size ?? 6;
|
||||
$class = $class ?? '';
|
||||
?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true" data-slot="icon" class="size-<?= $size ?? 6; ?> <?= $class ?? ''; ?>">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="m11.99 7.5 3.75-3.75m0 0 3.75 3.75m-3.75-3.75v16.499H4.49"/>
|
||||
</svg>
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
/**
|
||||
* @var \App\View\AppView $this
|
||||
* @var string|null $class
|
||||
* @var int|null $size
|
||||
*/
|
||||
|
||||
$size = $size ?? 6;
|
||||
$class = $class ?? '';
|
||||
?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true" data-slot="icon" class="size-<?= $size ?? 6; ?> <?= $class ?? ''; ?>">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M7.49 12 3.74 8.248m0 0 3.75-3.75m-3.75 3.75h16.5V19.5"/>
|
||||
</svg>
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
/**
|
||||
* @var \App\View\AppView $this
|
||||
* @var string|null $class
|
||||
* @var int|null $size
|
||||
*/
|
||||
|
||||
$size = $size ?? 6;
|
||||
$class = $class ?? '';
|
||||
?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true" data-slot="icon" class="size-<?= $size ?? 6; ?> <?= $class ?? ''; ?>">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="m16.49 12 3.75-3.751m0 0-3.75-3.75m3.75 3.75H3.74V19.5"/>
|
||||
</svg>
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
/**
|
||||
* @var \App\View\AppView $this
|
||||
* @var string|null $class
|
||||
* @var int|null $size
|
||||
*/
|
||||
|
||||
$size = $size ?? 6;
|
||||
$class = $class ?? '';
|
||||
?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true" data-slot="icon" class="size-<?= $size ?? 6; ?> <?= $class ?? ''; ?>">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="m15 11.25-3-3m0 0-3 3m3-3v7.5M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"/>
|
||||
</svg>
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
/**
|
||||
* @var \App\View\AppView $this
|
||||
* @var string|null $class
|
||||
* @var int|null $size
|
||||
*/
|
||||
|
||||
$size = $size ?? 6;
|
||||
$class = $class ?? '';
|
||||
?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true" data-slot="icon" class="size-<?= $size ?? 6; ?> <?= $class ?? ''; ?>">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="m19.5 19.5-15-15m0 0v11.25m0-11.25h11.25"/>
|
||||
</svg>
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
/**
|
||||
* @var \App\View\AppView $this
|
||||
* @var string|null $class
|
||||
* @var int|null $size
|
||||
*/
|
||||
|
||||
$size = $size ?? 6;
|
||||
$class = $class ?? '';
|
||||
?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true" data-slot="icon" class="size-<?= $size ?? 6; ?> <?= $class ?? ''; ?>">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M7.5 7.5h-.75A2.25 2.25 0 0 0 4.5 9.75v7.5a2.25 2.25 0 0 0 2.25 2.25h7.5a2.25 2.25 0 0 0 2.25-2.25v-7.5a2.25 2.25 0 0 0-2.25-2.25h-.75m0-3-3-3m0 0-3 3m3-3v11.25m6-2.25h.75a2.25 2.25 0 0 1 2.25 2.25v7.5a2.25 2.25 0 0 1-2.25 2.25h-7.5a2.25 2.25 0 0 1-2.25-2.25v-.75"/>
|
||||
</svg>
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
/**
|
||||
* @var \App\View\AppView $this
|
||||
* @var string|null $class
|
||||
* @var int|null $size
|
||||
*/
|
||||
|
||||
$size = $size ?? 6;
|
||||
$class = $class ?? '';
|
||||
?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true" data-slot="icon" class="size-<?= $size ?? 6; ?> <?= $class ?? ''; ?>">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M9 8.25H7.5a2.25 2.25 0 0 0-2.25 2.25v9a2.25 2.25 0 0 0 2.25 2.25h9a2.25 2.25 0 0 0 2.25-2.25v-9a2.25 2.25 0 0 0-2.25-2.25H15m0-3-3-3m0 0-3 3m3-3V15"/>
|
||||
</svg>
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
/**
|
||||
* @var \App\View\AppView $this
|
||||
* @var string|null $class
|
||||
* @var int|null $size
|
||||
*/
|
||||
|
||||
$size = $size ?? 6;
|
||||
$class = $class ?? '';
|
||||
?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true" data-slot="icon" class="size-<?= $size ?? 6; ?> <?= $class ?? ''; ?>">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="m4.5 19.5 15-15m0 0H8.25m11.25 0v11.25"/>
|
||||
</svg>
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
/**
|
||||
* @var \App\View\AppView $this
|
||||
* @var string|null $class
|
||||
* @var int|null $size
|
||||
*/
|
||||
|
||||
$size = $size ?? 6;
|
||||
$class = $class ?? '';
|
||||
?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true" data-slot="icon" class="size-<?= $size ?? 6; ?> <?= $class ?? ''; ?>">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M3 16.5v2.25A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75V16.5m-13.5-9L12 3m0 0 4.5 4.5M12 3v13.5"/>
|
||||
</svg>
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
/**
|
||||
* @var \App\View\AppView $this
|
||||
* @var string|null $class
|
||||
* @var int|null $size
|
||||
*/
|
||||
|
||||
$size = $size ?? 6;
|
||||
$class = $class ?? '';
|
||||
?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true" data-slot="icon" class="size-<?= $size ?? 6; ?> <?= $class ?? ''; ?>">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M4.5 10.5 12 3m0 0 7.5 7.5M12 3v18"/>
|
||||
</svg>
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
/**
|
||||
* @var \App\View\AppView $this
|
||||
* @var string|null $class
|
||||
* @var int|null $size
|
||||
*/
|
||||
|
||||
$size = $size ?? 6;
|
||||
$class = $class ?? '';
|
||||
?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true" data-slot="icon" class="size-<?= $size ?? 6; ?> <?= $class ?? ''; ?>">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="m15 15-6 6m0 0-6-6m6 6V9a6 6 0 0 1 12 0v3"/>
|
||||
</svg>
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
/**
|
||||
* @var \App\View\AppView $this
|
||||
* @var string|null $class
|
||||
* @var int|null $size
|
||||
*/
|
||||
|
||||
$size = $size ?? 6;
|
||||
$class = $class ?? '';
|
||||
?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true" data-slot="icon" class="size-<?= $size ?? 6; ?> <?= $class ?? ''; ?>">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M9 15 3 9m0 0 6-6M3 9h12a6 6 0 0 1 0 12h-3"/>
|
||||
</svg>
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
/**
|
||||
* @var \App\View\AppView $this
|
||||
* @var string|null $class
|
||||
* @var int|null $size
|
||||
*/
|
||||
|
||||
$size = $size ?? 6;
|
||||
$class = $class ?? '';
|
||||
?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true" data-slot="icon" class="size-<?= $size ?? 6; ?> <?= $class ?? ''; ?>">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="m15 15 6-6m0 0-6-6m6 6H9a6 6 0 0 0 0 12h3"/>
|
||||
</svg>
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
/**
|
||||
* @var \App\View\AppView $this
|
||||
* @var string|null $class
|
||||
* @var int|null $size
|
||||
*/
|
||||
|
||||
$size = $size ?? 6;
|
||||
$class = $class ?? '';
|
||||
?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true" data-slot="icon" class="size-<?= $size ?? 6; ?> <?= $class ?? ''; ?>">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="m9 9 6-6m0 0 6 6m-6-6v12a6 6 0 0 1-12 0v-3"/>
|
||||
</svg>
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
/**
|
||||
* @var \App\View\AppView $this
|
||||
* @var string|null $class
|
||||
* @var int|null $size
|
||||
*/
|
||||
|
||||
$size = $size ?? 6;
|
||||
$class = $class ?? '';
|
||||
?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true" data-slot="icon" class="size-<?= $size ?? 6; ?> <?= $class ?? ''; ?>">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M9 9V4.5M9 9H4.5M9 9 3.75 3.75M9 15v4.5M9 15H4.5M9 15l-5.25 5.25M15 9h4.5M15 9V4.5M15 9l5.25-5.25M15 15h4.5M15 15v4.5m0-4.5 5.25 5.25"/>
|
||||
</svg>
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
/**
|
||||
* @var \App\View\AppView $this
|
||||
* @var string|null $class
|
||||
* @var int|null $size
|
||||
*/
|
||||
|
||||
$size = $size ?? 6;
|
||||
$class = $class ?? '';
|
||||
?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true" data-slot="icon" class="size-<?= $size ?? 6; ?> <?= $class ?? ''; ?>">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M3.75 3.75v4.5m0-4.5h4.5m-4.5 0L9 9M3.75 20.25v-4.5m0 4.5h4.5m-4.5 0L9 15M20.25 3.75h-4.5m4.5 0v4.5m0-4.5L15 9m5.25 11.25h-4.5m4.5 0v-4.5m0 4.5L15 15"/>
|
||||
</svg>
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
/**
|
||||
* @var \App\View\AppView $this
|
||||
* @var string|null $class
|
||||
* @var int|null $size
|
||||
*/
|
||||
|
||||
$size = $size ?? 6;
|
||||
$class = $class ?? '';
|
||||
?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true" data-slot="icon" class="size-<?= $size ?? 6; ?> <?= $class ?? ''; ?>">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M7.5 21 3 16.5m0 0L7.5 12M3 16.5h13.5m0-13.5L21 7.5m0 0L16.5 12M21 7.5H7.5"/>
|
||||
</svg>
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
/**
|
||||
* @var \App\View\AppView $this
|
||||
* @var string|null $class
|
||||
* @var int|null $size
|
||||
*/
|
||||
|
||||
$size = $size ?? 6;
|
||||
$class = $class ?? '';
|
||||
?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true" data-slot="icon" class="size-<?= $size ?? 6; ?> <?= $class ?? ''; ?>">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M3 7.5 7.5 3m0 0L12 7.5M7.5 3v13.5m13.5 0L16.5 21m0 0L12 16.5m4.5 4.5V7.5"/>
|
||||
</svg>
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
/**
|
||||
* @var \App\View\AppView $this
|
||||
* @var string|null $class
|
||||
* @var int|null $size
|
||||
*/
|
||||
|
||||
$size = $size ?? 6;
|
||||
$class = $class ?? '';
|
||||
?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true" data-slot="icon" class="size-<?= $size ?? 6; ?> <?= $class ?? ''; ?>">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M16.5 12a4.5 4.5 0 1 1-9 0 4.5 4.5 0 0 1 9 0Zm0 0c0 1.657 1.007 3 2.25 3S21 13.657 21 12a9 9 0 1 0-2.636 6.364M16.5 12V8.25"/>
|
||||
</svg>
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
/**
|
||||
* @var \App\View\AppView $this
|
||||
* @var string|null $class
|
||||
* @var int|null $size
|
||||
*/
|
||||
|
||||
$size = $size ?? 6;
|
||||
$class = $class ?? '';
|
||||
?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true" data-slot="icon" class="size-<?= $size ?? 6; ?> <?= $class ?? ''; ?>">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M12 9.75 14.25 12m0 0 2.25 2.25M14.25 12l2.25-2.25M14.25 12 12 14.25m-2.58 4.92-6.374-6.375a1.125 1.125 0 0 1 0-1.59L9.42 4.83c.21-.211.497-.33.795-.33H19.5a2.25 2.25 0 0 1 2.25 2.25v10.5a2.25 2.25 0 0 1-2.25 2.25h-9.284c-.298 0-.585-.119-.795-.33Z"/>
|
||||
</svg>
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
/**
|
||||
* @var \App\View\AppView $this
|
||||
* @var string|null $class
|
||||
* @var int|null $size
|
||||
*/
|
||||
|
||||
$size = $size ?? 6;
|
||||
$class = $class ?? '';
|
||||
?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true" data-slot="icon" class="size-<?= $size ?? 6; ?> <?= $class ?? ''; ?>">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M21 16.811c0 .864-.933 1.406-1.683.977l-7.108-4.061a1.125 1.125 0 0 1 0-1.954l7.108-4.061A1.125 1.125 0 0 1 21 8.689v8.122ZM11.25 16.811c0 .864-.933 1.406-1.683.977l-7.108-4.061a1.125 1.125 0 0 1 0-1.954l7.108-4.061a1.125 1.125 0 0 1 1.683.977v8.122Z"/>
|
||||
</svg>
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
/**
|
||||
* @var \App\View\AppView $this
|
||||
* @var string|null $class
|
||||
* @var int|null $size
|
||||
*/
|
||||
|
||||
$size = $size ?? 6;
|
||||
$class = $class ?? '';
|
||||
?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true" data-slot="icon" class="size-<?= $size ?? 6; ?> <?= $class ?? ''; ?>">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M2.25 18.75a60.07 60.07 0 0 1 15.797 2.101c.727.198 1.453-.342 1.453-1.096V18.75M3.75 4.5v.75A.75.75 0 0 1 3 6h-.75m0 0v-.375c0-.621.504-1.125 1.125-1.125H20.25M2.25 6v9m18-10.5v.75c0 .414.336.75.75.75h.75m-1.5-1.5h.375c.621 0 1.125.504 1.125 1.125v9.75c0 .621-.504 1.125-1.125 1.125h-.375m1.5-1.5H21a.75.75 0 0 0-.75.75v.75m0 0H3.75m0 0h-.375a1.125 1.125 0 0 1-1.125-1.125V15m1.5 1.5v-.75A.75.75 0 0 0 3 15h-.75M15 10.5a3 3 0 1 1-6 0 3 3 0 0 1 6 0Zm3 0h.008v.008H18V10.5Zm-12 0h.008v.008H6V10.5Z"/>
|
||||
</svg>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue