CopyModel
extends CopyModel
in package
uses
ExtensionsTrait
Class created by Core/Internal/PluginsDeploy
Table of Contents
Constants
- MODEL_NAMESPACE = '\FacturaScripts\Dinamic\Model\\'
- TEMPLATE_ASIENTO = 'CopyAsiento'
- TEMPLATE_PRODUCTO = 'CopyProducto'
Properties
- $codeModel : CodeModel
- $empresa : Empresa
- Selected company.
- $model : object
- $modelClass : string
- $modelCode : string
- $multiRequestProtection : MultiRequestProtection
- $paymentMethodsList : array<string|int, mixed>
- $permissions : ControllerPermissions
- User permissions on this controller.
- $request : Request
- Request on which we can get data.
- $title : string
- Title of the page.
- $uri : string
- Given uri, default is empty.
- $user : User|false
- User logged in.
- $warehousesList : array<string|int, mixed>
- $dataBase : DataBase
- It provides direct access to the database.
- $extensionCache : array<string|int, mixed>
- Cache for extension lookups by method name.
- $extensions : array<string|int, mixed>
- Stores class extensions.
- $response : Response
- HTTP Response object.
Methods
- __call() : mixed
- Executes the first matched extension.
- __construct() : mixed
- Initialize all objects and properties.
- addExtension() : void
- clearExtensions() : void
- Clears all registered extensions.
- getExtensions() : array<string|int, mixed>
- Returns a list of all registered extension names.
- getPageData() : array<string|int, mixed>
- Return the basic data for this page.
- getTemplate() : string|false
- Return the template to use for this controller.
- hasExtension() : bool
- pipe() : mixed
- pipeFalse() : bool
- privateCore() : mixed
- Runs the controller's private logic.
- publicCore() : mixed
- Execute the public part of the controller.
- redirect() : mixed
- Redirect to an url or controller.
- removeExtension() : bool
- Removes all extensions with the specified name.
- request() : Request
- run() : void
- setTemplate() : bool
- Set the template to use for this controller.
- url() : string
- Return the URL of the actual controller.
- autocompleteAction() : void
- db() : DataBase
- getClassName() : string
- Return the name of the controller.
- loadModel() : bool
- prepareBusinessDocumentLists() : void
- response() : Response
- saveAccountingEntry() : void
- saveDocumentEnd() : void
- saveProduct() : void
- savePurchaseDocument() : void
- saveSalesDocument() : void
- validateFormToken() : bool
- Check request token. Returns an error if: - the token does not exist - the token is invalid - the token is duplicated
- buildExtensionCache() : void
- Builds and caches sorted extensions for a method name.
Constants
MODEL_NAMESPACE
public
mixed
MODEL_NAMESPACE
= '\FacturaScripts\Dinamic\Model\\'
TEMPLATE_ASIENTO
public
mixed
TEMPLATE_ASIENTO
= 'CopyAsiento'
TEMPLATE_PRODUCTO
public
mixed
TEMPLATE_PRODUCTO
= 'CopyProducto'
Properties
$codeModel
public
CodeModel
$codeModel
$empresa
Selected company.
public
Empresa
$empresa
$model
public
object
$model
$modelClass
public
string
$modelClass
$modelCode
public
string
$modelCode
$multiRequestProtection
public
MultiRequestProtection
$multiRequestProtection
$paymentMethodsList
public
array<string|int, mixed>
$paymentMethodsList
= []
$permissions
User permissions on this controller.
public
ControllerPermissions
$permissions
$request
Request on which we can get data.
public
Request
$request
$title
Title of the page.
public
string
$title
título de la página.
$uri
Given uri, default is empty.
public
string
$uri
$user
User logged in.
public
User|false
$user
= false
$warehousesList
public
array<string|int, mixed>
$warehousesList
= []
$dataBase
It provides direct access to the database.
protected
DataBase
$dataBase
$extensionCache
Cache for extension lookups by method name.
protected
static array<string|int, mixed>
$extensionCache
= []
$extensions
Stores class extensions.
protected
static array<string|int, mixed>
$extensions
= []
$response
HTTP Response object.
protected
Response
$response
Methods
__call()
Executes the first matched extension.
public
__call(string $name[, array<string|int, mixed> $arguments = [] ]) : mixed
Parameters
- $name : string
- $arguments : array<string|int, mixed> = []
Tags
__construct()
Initialize all objects and properties.
public
__construct(string $className[, string $uri = '' ]) : mixed
Parameters
- $className : string
- $uri : string = ''
addExtension()
public
static addExtension(mixed $extension[, int $priority = 100 ]) : void
Parameters
- $extension : mixed
- $priority : int = 100
-
Priority for all methods in this extension (0-1000, default 100)
clearExtensions()
Clears all registered extensions.
public
static clearExtensions() : void
getExtensions()
Returns a list of all registered extension names.
public
static getExtensions() : array<string|int, mixed>
Return values
array<string|int, mixed>getPageData()
Return the basic data for this page.
public
getPageData() : array<string|int, mixed>
Return values
array<string|int, mixed>getTemplate()
Return the template to use for this controller.
public
getTemplate() : string|false
Return values
string|falsehasExtension()
public
hasExtension(mixed $name) : bool
Parameters
- $name : mixed
Return values
boolpipe()
public
pipe(string $name, array<string|int, mixed> ...$arguments) : mixed
Parameters
- $name : string
- $arguments : array<string|int, mixed>
pipeFalse()
public
pipeFalse(string $name, array<string|int, mixed> ...$arguments) : bool
Parameters
- $name : string
- $arguments : array<string|int, mixed>
Return values
boolprivateCore()
Runs the controller's private logic.
public
privateCore(Response &$response, User $user, ControllerPermissions $permissions) : mixed
Parameters
- $response : Response
- $user : User
- $permissions : ControllerPermissions
publicCore()
Execute the public part of the controller.
public
publicCore(Response &$response) : mixed
Parameters
- $response : Response
redirect()
Redirect to an url or controller.
public
redirect(string $url[, int $delay = 0 ]) : mixed
Parameters
- $url : string
- $delay : int = 0
removeExtension()
Removes all extensions with the specified name.
public
static removeExtension(string $name) : bool
Parameters
- $name : string
Return values
bool —True if at least one extension was removed
request()
public
request() : Request
Return values
Requestrun()
public
run() : void
setTemplate()
Set the template to use for this controller.
public
setTemplate(string|false $template) : bool
Parameters
- $template : string|false
Return values
boolurl()
Return the URL of the actual controller.
public
url() : string
Return values
stringautocompleteAction()
protected
autocompleteAction() : void
db()
protected
db() : DataBase
Return values
DataBasegetClassName()
Return the name of the controller.
protected
getClassName() : string
Return values
stringloadModel()
protected
loadModel() : bool
Return values
boolprepareBusinessDocumentLists()
protected
prepareBusinessDocumentLists() : void
response()
protected
response() : Response
Return values
ResponsesaveAccountingEntry()
protected
saveAccountingEntry() : void
saveDocumentEnd()
protected
saveDocumentEnd(BusinessDocument $newDoc) : void
Parameters
- $newDoc : BusinessDocument
saveProduct()
protected
saveProduct() : void
savePurchaseDocument()
protected
savePurchaseDocument() : void
saveSalesDocument()
protected
saveSalesDocument() : void
validateFormToken()
Check request token. Returns an error if: - the token does not exist - the token is invalid - the token is duplicated
protected
validateFormToken() : bool
Return values
boolbuildExtensionCache()
Builds and caches sorted extensions for a method name.
private
buildExtensionCache(string $name) : void
Parameters
- $name : string