Class ManufacturerAjaxController

Class ManufacturerAjaxController

HttpViewController implements HttpViewControllerInterface
AdminHttpViewController implements AdminStatusOnlyInterface
ManufacturerAjaxController
Package: AdminHttpViewControllers
Category: System
Extends: AdminHttpViewController
Located at Controllers/HttpView/AdminAjax/ManufacturerAjaxController.inc.php

Methods summary

public init( void )

Initialization of Manufacturer controller

public actionSave( void ) : boolean

Creates an manufacturer entity in the database.

protected _storeManufacturer( ManufacturerInterface $manufacturer ) : array

Creates manufacturers data from post data. manufacturer_urls from $_POST parameter are set by this method.

protected _storeManufacturerUrls( ManufacturerInterface $manufacturer ) :

Stores all manufacturer urls with language id.

protected _storeManufacturerImage( ManufacturerInterface $manufacturer ) :

Stores an manufacturer image or replace one.

protected _storeManufacturerImageName( ManufacturerInterface $manufacturer ) :

Stores manufacturer image name if set.

protected _deleteImageCheckbox( ManufacturerInterface $manufacturer ) :

If checkbox are checked, delete the manufacturer image.

protected _isImageNameChanged( ManufacturerInterface $manufacturer ) : boolean

Checks if the name of the image has changed.

protected _setImageToManufacturer( ManufacturerInterface $manufacturer, ExistingFile $existingFilesTmpName, FilenameStringType $imageName ) :

Set an Image to an Manufacturer after saving it in the Filesystem.

protected _deleteImageIfExists( ManufacturerInterface $manufacturer ) :

Deletes image from manufacturer if set.

public _removeImage( void ) :

Removes an manufacturers image in the database and filesystem if image is set.

protected _manufacturerById( string $type = 'get' ) : ManufacturerInterface
public actionGetData( void ) : boolean

Gets all manufacturers entity's from database.

protected _serializeManufacturerCollection( ManufacturerCollection $manufacturerCollection ) : array

Serializes manufacturer collections.

protected _serializeManufacturer( ManufacturerInterface $manufacturer ) : array

Serializes manufacturer entities.

protected _langIdsByLangCode( array $languageCodes ) : array

Converts an array with language codes to an array with codes as key and the language id as value.

public actionGetById( void ) : boolean

Gets an manufacturers entity from database by id.

public actionUpdate( void ) : boolean

Updates an manufacturers entity in the database.

public actionRemove( void ) : boolean

Removes an manufacturers entity in the database.

protected _deserializeManufacturer( string $manufacturerJson, null $id = null ) : Manufacturer

Deserialize manufacturer entities.

Methods inherited from AdminHttpViewController

validateCurrentAdminStatus()

Methods inherited from HttpViewController

__construct(), _callActionMethod(), _getPostData(), _getPostDataCollection(), _getQueryParameter(), _getQueryParametersCollection(), _getServerData(), _render(), _validatePageToken(), actionDefault(), getTemplateFile(), proceed()

Properties summary

Properties inherited from HttpViewController

$assets, $contentView, $httpContextReader, $httpResponseProcessor, $postDataArray, $queryParametersArray, $serverDataArray