ProductImagesTrait
Auxiliar Method for images of the product.
Tags
Table of Contents
- addHtmlView() : mixed
 - addImageAction() : bool
 - Add a list of images.
 - createAttachedFile() : int
 - Create the record in the AttachedFile model and returns its identifier.
 - createFileRelation() : void
 - Create the record in the AttachedFileRelation model.
 - createProductImage() : int|null
 - Create the record in the ProductoImagen model and returns its idproducto.
 - createViewsProductImages() : void
 - Add view for product images.
 - deleteImageAction() : bool
 - Delete an image.
 - validateFormToken() : bool
 
Methods
addHtmlView()
    protected
    abstract                addHtmlView(string $viewName, string $fileName, string $modelName, string $viewTitle[, string $viewIcon = 'fab fa-html5' ]) : mixed
        
        Parameters
- $viewName : string
 - $fileName : string
 - $modelName : string
 - $viewTitle : string
 - $viewIcon : string = 'fab fa-html5'
 
Return values
mixed —addImageAction()
Add a list of images.
    protected
                    addImageAction() : bool
    
    
    
        Return values
bool —createAttachedFile()
Create the record in the AttachedFile model and returns its identifier.
    protected
                    createAttachedFile(string $path) : int
    
        Parameters
- $path : string
 
Return values
int —createFileRelation()
Create the record in the AttachedFileRelation model.
    protected
                    createFileRelation(int $idproduct, int $idfile) : void
    
        Parameters
- $idproduct : int
 - $idfile : int
 
Return values
void —createProductImage()
Create the record in the ProductoImagen model and returns its idproducto.
    protected
                    createProductImage(int $idfile) : int|null
    
        Parameters
- $idfile : int
 
Return values
int|null —createViewsProductImages()
Add view for product images.
    protected
                    createViewsProductImages([string $viewName = 'EditProductoImagen' ]) : void
    
        Parameters
- $viewName : string = 'EditProductoImagen'
 
Return values
void —deleteImageAction()
Delete an image.
    protected
                    deleteImageAction() : bool
    
    
    
        Return values
bool —validateFormToken()
    protected
    abstract                validateFormToken() : bool