Overview
  • Package
  • Class
  • Tree
  • Todo

Packages

  • AddonValue
    • Interfaces
  • AdminHttpViewControllers
  • ApiV2Controllers
  • Authentication
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Strategies
  • Category
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Providers
    • Repositories
    • Storages
  • Customer
    • Address
    • Country
    • CountryZone
    • Interfaces
    • Storages
    • Validation
    • ValueObjects
  • CustomerGroup
    • Entities
    • Factories
    • Interfaces
    • Repositories
    • Serializers
    • Services
    • ValueObjects
  • Email
    • Collections
    • Entities
    • Exceptions
    • Interfaces
    • Repository
    • ValueObjects
  • Extensions
    • Customers
    • Emails
    • Geschaeftskundenversand
    • Helpers
    • Invoices
    • Orders
    • ParcelShopFinder
    • QuickEdit
    • Serializers
    • Templates
  • Geschaeftskundenversand
    • Exceptions
  • Http
    • Collections
    • Exceptions
    • Factories
    • Interfaces
    • ValueObjects
  • HttpViewControllers
  • InfoBox
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Repositories
  • Invoice
    • Interfaces
    • ValueObjects
  • Loaders
    • CrossCuttingLoader
    • GXCoreLoader
    • Interfaces
  • Manufacturer
    • Entities
    • Factories
    • Interfaces
    • Repositories
  • Modules
    • Collections
    • Controllers
    • Interfaces
  • None
  • Order
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Repositories
    • Storages
    • ValueObjects
  • OrderStatus
    • Collections
    • Entities
    • Exceptions
    • Factories
    • Interfaces
    • Repositories
  • Precheck
  • Product
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Providers
    • Repositories
    • Storages
  • ProductModule
    • Collections
    • Deleter
    • Entities
    • Factories
    • Interface
    • Interfaces
    • Reader
    • Repositories
    • Writer
  • QuantityUnit
    • Entities
    • Factories
    • Repositories
  • QuickEdit
    • Interfaces
    • Repositories
  • Shared
    • ClassFinder
    • Exceptions
    • FileSystem
    • Interfaces
    • Storage
    • Types
  • SharedShoppingCart
    • Interfaces
  • Slider
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Repositories
    • Storages
  • Smarty
    • plugins
  • StaticSeoUrl
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Repositories
  • StaticSeoUrls
  • Statistics
    • Interfaces
  • UserConfiguration
    • Interfaces
    • Repository
  • VersionInfo
    • Factories
    • Reader
    • ValueObjects
  • VPE
    • Entities
    • Factories
    • Repositories

Classes

  • AbstractAddonValueServiceFactory
  • AbstractAddonValueStorage
  • AbstractApiV2Controller
  • AbstractCategoryServiceFactory
  • AbstractCollection
  • AbstractCreateAccountProcess
  • AbstractCustomerFactory
  • AbstractCustomerServiceFactory
  • AbstractFileStorage
  • AbstractHttpContextFactory
  • AbstractHttpViewControllerRegistryFactory
  • AbstractImagesApiV2Controller
  • AbstractInvoiceServiceFactory
  • AbstractJsonSerializer
  • AbstractModuleCenterModule
  • AbstractModuleCenterModuleController
  • AbstractOrderServiceFactory
  • AbstractProductAttributeServiceFactory
  • AbstractProductServiceFactory
  • AbstractSliderServiceFactory
  • AbstractStaticSeoUrlServiceFactory
  • AbstractVersionInfoItem
  • AbstractVersionInfoReader
  • AddonValueService
  • AddonValueServiceFactory
  • AddonValueStorageFactory
  • AddressBlock
  • AddressBookService
  • AddressClass
  • AddressesApiV2Controller
  • AddressFormatProvider
  • AddressFormatsApiV2Controller
  • AddressJsonSerializer
  • AdminFavoritesAjaxController
  • AdminHttpViewController
  • AdminInfoBoxAjaxController
  • AdminLayoutHttpControllerResponse
  • AdminPageHttpControllerResponse
  • AfterbuyAjaxController
  • AfterbuyModuleCenterModule
  • AfterbuyModuleCenterModuleController
  • AmazonPayConfigurationController
  • ApiV2Authenticator
  • Asset
  • AssetCollection
  • AttachmentCollection
  • AttachmentName
  • AttachmentPath
  • AttachmentsApiV2Controller
  • AttachmentsHandler
  • AuthFactory
  • AuthService
  • AuthSettings
  • AuthStrategyCollection
  • BoolType
  • BrickfoxModuleCenterModule
  • BrickfoxModuleCenterModuleController
  • CacheTokenHelper
  • CartController
  • CartDropdownController
  • CartShippingCostsController
  • CatalogSelectWidgetAjaxController
  • CategoriesApiV2Controller
  • Category
  • CategoryAddonValueStorage
  • CategoryFactory
  • CategoryIconsApiV2Controller
  • CategoryImagesApiV2Controller
  • CategoryJsonSerializer
  • CategoryListItem
  • CategoryListItemCollection
  • CategoryListItemJsonSerializer
  • CategoryListProvider
  • CategoryListProviderFactory
  • CategoryObjectService
  • CategoryReadService
  • CategoryRepository
  • CategoryRepositoryDeleter
  • CategoryRepositoryReader
  • CategoryRepositoryWriter
  • CategoryServiceFactory
  • CategorySettings
  • CategorySettingsRepository
  • CategorySettingsRepositoryReader
  • CategorySettingsRepositoryWriter
  • CategoryWriteService
  • CheckQuantityController
  • CheckStatusController
  • ClassFinder
  • ColorHelper
  • ContactCollection
  • ContactName
  • ContactType
  • ContentManagerElementsAjaxController
  • ContentManagerElementsController
  • ContentManagerPagesAjaxController
  • ContentManagerPagesController
  • ContentManagerProductContentsAjaxController
  • ContentManagerProductContentsController
  • ContentNavigationCollection
  • CookieBarController
  • CountriesApiV2Controller
  • CountryJsonSerializer
  • CountryService
  • CreateAccountProcess
  • CreateGuestController
  • CreateRegistreeController
  • CrossCuttingLoader
  • CurrencyCode
  • Customer
  • CustomerAccountInputValidator
  • CustomerAdditionalAddressInfo
  • CustomerAddonValueStorage
  • CustomerAddress
  • CustomerAddressDeleter
  • CustomerAddressInputValidator
  • CustomerAddressReader
  • CustomerAddressRepository
  • CustomerAddressWriter
  • CustomerB2BStatus
  • CustomerCallNumber
  • CustomerCity
  • CustomerCompany
  • CustomerCountry
  • CustomerCountryIso2
  • CustomerCountryIso3
  • CustomerCountryName
  • CustomerCountryReader
  • CustomerCountryRepository
  • CustomerCountryZone
  • CustomerCountryZoneIsoCode
  • CustomerCountryZoneName
  • CustomerCountryZoneReader
  • CustomerCountryZoneRepository
  • CustomerDateOfBirth
  • CustomerDeleter
  • CustomerEmail
  • CustomerFactory
  • CustomerFirstname
  • CustomerGender
  • CustomerGroup
  • CustomerGroupAccessRepository
  • CustomerGroupCollection
  • CustomerGroupCollectionSerializer
  • CustomerGroupConfigurations
  • CustomerGroupConfigurationsSerializer
  • CustomerGroupDeleter
  • CustomerGroupFactory
  • CustomerGroupReader
  • CustomerGroupReadService
  • CustomerGroupRepository
  • CustomerGroupsApiV2Controller
  • CustomerGroupSerializer
  • CustomerGroupServiceFactory
  • CustomerGroupSettings
  • CustomerGroupSettingsSerializer
  • CustomerGroupWriter
  • CustomerGroupWriteService
  • CustomerHashedPassword
  • CustomerHouseNumber
  • CustomerInputToCollectionTransformer
  • CustomerInputValidator
  • CustomerInputValidatorSettings
  • CustomerJsonSerializer
  • CustomerLastname
  • CustomerLoginController
  • CustomerMemo
  • CustomerMemoCollection
  • CustomerNumber
  • CustomerPassword
  • CustomerPostcode
  • CustomerReader
  • CustomerReadService
  • CustomerRegistrationInputValidatorService
  • CustomerRepository
  • CustomersApiV2Controller
  • CustomerService
  • CustomerServiceFactory
  • CustomerServiceSettings
  • CustomerStatusHelper
  • CustomerStatusInformation
  • CustomerStatusProvider
  • CustomerStreet
  • CustomerSuburb
  • CustomerVatNumber
  • CustomerWriter
  • CustomerWriteService
  • DashboardController
  • DataTableColumn
  • DataTableColumnCollection
  • DataTableColumnType
  • DataTableHelper
  • DecimalType
  • DefaultApiV2Controller
  • DefaultTemplateSettings
  • DocumentFileStorage
  • DynamicShopMessagesController
  • EditableCollection
  • EditableKeyValueCollection
  • EkomiModuleCenterModule
  • EkomiModuleCenterModuleController
  • Email
  • EmailAddress
  • EmailAttachment
  • EmailCollection
  • EmailContact
  • EmailContent
  • EmailDeleter
  • EmailFactory
  • EmailJsonSerializer
  • EmailParser
  • EmailReader
  • EmailRepository
  • EmailsApiV2Controller
  • EmailsController
  • EmailService
  • EmailStringType
  • EmailSubject
  • EmailWriter
  • EmbeddedModuleController
  • EmptyCurrencyCode
  • EmptyDateTime
  • EmptyLanguageCode
  • EmptyProductImage
  • EnvCategoryServiceSettings
  • EnvInvoiceServiceSettings
  • EnvironmentClassFinderSettings
  • EnvironmentHttpContextFactory
  • EnvironmentHttpViewControllerRegistryFactory
  • EnvProductImageFileStorageSettings
  • EnvSlideImageFileStorageSettings
  • ExistingDirectory
  • ExistingFile
  • ExtraContentController
  • FileDownloadInformation
  • FileManagerController
  • FilenameStringType
  • FilesystemHelper
  • FilterController
  • FindologicModuleCenterModule
  • FindologicModuleCenterModuleController
  • FontAwesomeIconClassProvider
  • FrontendFilenamesProvider
  • GeschaeftskundenversandConfigurationStorage
  • GeschaeftskundenversandController
  • GeschaeftskundenversandLogger
  • GeschaeftskundenversandModuleCenterModule
  • GeschaeftskundenversandModuleCenterModuleController
  • GeschaeftskundenversandProduct
  • GeschaeftskundenversandShipment
  • GeschaeftskundenversandSoapAdapter
  • GoogleAdwordConversionModuleCenterModule
  • GoogleAdwordConversionModuleCenterModuleController
  • GXCoreLoader
  • GXCoreLoaderSettings
  • GXEngineOrder
  • GXEngineProduct
  • GXEngineQuantityUnit
  • GXSmarty
  • HeidelpayModuleCenterModuleController
  • HermesModuleCenterModule
  • HermesModuleCenterModuleController
  • HttpApiV2Controller
  • HttpContext
  • HttpContextReader
  • HttpControllerResponse
  • HttpDispatcher
  • HttpResponseProcessor
  • HttpService
  • HttpServiceFactory
  • HttpViewController
  • HttpViewControllerFactory
  • HttpViewControllerRegistry
  • IdCollection
  • IdType
  • IloxxModuleCenterModule
  • IloxxModuleCenterModuleController
  • ImageFileStorage
  • ImageProcessingController
  • ImageRequestController
  • InfoBoxFactory
  • InfoBoxMessage
  • InfoBoxMessageCollection
  • InfoBoxRepository
  • InfoBoxRepositoryDeleter
  • InfoBoxRepositoryReader
  • InfoBoxRepositoryWriter
  • InfoBoxService
  • IntrashipModuleCenterModule
  • IntrashipModuleCenterModuleController
  • IntType
  • InvoiceActions
  • InvoiceArchiveReadService
  • InvoiceArchiveWriteService
  • InvoiceFileEntitler
  • InvoiceInformation
  • InvoiceListGenerator
  • InvoiceListItem
  • InvoiceListItemCollection
  • InvoiceRepository
  • InvoiceServiceFactory
  • InvoicesModalsAjaxController
  • InvoicesOverviewAjaxController
  • InvoicesOverviewColumns
  • InvoicesOverviewController
  • InvoicesOverviewTooltips
  • ItRechtModuleCenterModule
  • ItRechtModuleCenterModuleController
  • JanolawModuleCenterModule
  • JanolawModuleCenterModuleController
  • JsConfigurationController
  • JSEngineConfiguration
  • JsonHttpControllerResponse
  • JsTranslationsController
  • JSWidgetsAjaxController
  • KeyValueCollection
  • KlarnaModuleCenterModuleController
  • LanguageCode
  • LanguageHelper
  • LanguageProvider
  • LawsController
  • LegacyProductImageProcessing
  • LettrModuleCenterModule
  • LettrModuleCenterModuleController
  • LiveSearchController
  • MagnalisterModuleCenterModule
  • MagnalisterModuleCenterModuleController
  • MailbeezModuleCenterModule
  • MailbeezModuleCenterModuleController
  • MailerAdapter
  • Manufacturer
  • ManufacturerCollection
  • ManufacturerDeleter
  • ManufacturerFactory
  • ManufacturerReader
  • ManufacturerReadService
  • ManufacturerRepository
  • ManufacturersApiV2Controller
  • ManufacturerServiceFactory
  • ManufacturerWriter
  • ManufacturerWriteService
  • MaxFileSizeController
  • Md5Strategy
  • MediafinanzModuleCenterModule
  • MediafinanzModuleCenterModuleController
  • ModuleCenterController
  • ModuleCenterModuleCollection
  • ModuleTitleProvider
  • NewAttributesController
  • NewsletterLinkModuleCenterModule
  • NewsletterLinkModuleCenterModuleController
  • NonEmptyStringType
  • OrderActions
  • OrderAddonValueStorage
  • OrderAddressBlock
  • OrderFactory
  • OrderItem
  • OrderItemAddonValueStorage
  • OrderItemAttribute
  • OrderItemAttributeCollection
  • OrderItemAttributeFactory
  • OrderItemAttributeRepository
  • OrderItemAttributeRepositoryDeleter
  • OrderItemAttributeRepositoryFactory
  • OrderItemAttributeRepositoryReader
  • OrderItemAttributeRepositoryWriter
  • OrderItemCollection
  • OrderItemDownloadInformation
  • OrderItemDownloadInformationCollection
  • OrderItemFactory
  • OrderItemProperty
  • OrderItemPropertyFactory
  • OrderItemPropertyRepository
  • OrderItemPropertyRepositoryDeleter
  • OrderItemPropertyRepositoryReader
  • OrderItemPropertyRepositoryWriter
  • OrderItemRepository
  • OrderItemRepositoryDeleter
  • OrderItemRepositoryReader
  • OrderItemRepositoryWriter
  • OrderJsonSerializer
  • OrderListGenerator
  • OrderListItem
  • OrderListItemCollection
  • OrderListItemJsonSerializer
  • OrderObjectService
  • OrderPaymentType
  • OrderReadService
  • OrderRepository
  • OrderRepositoryDeleter
  • OrderRepositoryReader
  • OrderRepositoryWriter
  • OrdersApiV2Controller
  • OrderServiceFactory
  • OrderServiceSettings
  • OrderShippingType
  • OrdersHistoryApiV2Controller
  • OrdersItemsApiV2Controller
  • OrdersItemsAttributesApiV2Controller
  • OrdersModalsAjaxController
  • OrdersOverviewAjaxController
  • OrdersOverviewColumns
  • OrdersOverviewController
  • OrdersOverviewTooltips
  • OrderStatus
  • OrderStatusCollection
  • OrderStatusDeleter
  • OrderStatusesApiV2Controller
  • OrderStatusFactory
  • OrderStatusHistoryListItem
  • OrderStatusHistoryListItemCollection
  • OrderStatusHistoryStorage
  • OrderStatusReader
  • OrderStatusRepository
  • OrderStatusService
  • OrderStatusServiceFactory
  • OrderStatusStyles
  • OrderStatusWriter
  • OrdersTotalsApiV2Controller
  • OrderTooltipController
  • OrderTotal
  • OrderTotalCollection
  • OrderTotalFactory
  • OrderTotalRepository
  • OrderTotalRepositoryDeleter
  • OrderTotalRepositoryReader
  • OrderTotalRepositoryWriter
  • OrderTrackingInformationCollection
  • OrderWriteService
  • PackedDownloadController
  • ParcelShopFinder
  • ParcelshopfinderController
  • ParcelShopFinderLogger
  • ParcelshopfinderModuleCenterModule
  • ParcelshopfinderModuleCenterModuleController
  • PasswordEncryptionSettings
  • PasswordHashStrategy
  • PathType
  • PaymentTitleProvider
  • PayOneModuleCenterModuleController
  • PayPalConfigurationController
  • PayPalController
  • PaypalNGModuleCenterModuleController
  • PostfinderModuleCenterModule
  • PostfinderModuleCenterModuleController
  • Precheck
  • ProductAddonValueStorage
  • ProductAttribute
  • ProductAttributeCollection
  • ProductAttributeFactory
  • ProductAttributeObjectService
  • ProductAttributeRepository
  • ProductAttributeRepositoryDeleter
  • ProductAttributeRepositoryReader
  • ProductAttributeRepositoryWriter
  • ProductAttributeService
  • ProductAttributeServiceFactory
  • ProductAttributesModuleCenterModule
  • ProductAttributesModuleCenterModuleController
  • ProductCategoryLinker
  • ProductFactory
  • ProductImage
  • ProductImageCollection
  • ProductImageContainer
  • ProductImageContainerRepository
  • ProductImageFileStorage
  • ProductImagesApiV2Controller
  • ProductJsonSerializer
  • ProductListItem
  • ProductListItemCollection
  • ProductListItemJsonSerializer
  • ProductListProvider
  • ProductListProviderFactory
  • ProductMediaContentController
  • ProductObjectService
  • ProductPermissionSetter
  • ProductQuestionController
  • ProductReadService
  • ProductRepository
  • ProductRepositoryDeleteHelper
  • ProductRepositoryDeleter
  • ProductRepositoryReader
  • ProductRepositoryWriter
  • ProductsApiV2Controller
  • ProductsContentFileStorage
  • ProductServiceFactory
  • ProductSettings
  • ProductSettingsRepository
  • ProductSettingsRepositoryReader
  • ProductSettingsRepositoryWriter
  • ProductsLinksApiV2Controller
  • ProductWriteService
  • ProtectedShopsModuleCenterModule
  • ProtectedShopsModuleCenterModuleController
  • QuantityUnitAjaxController
  • QuantityUnitCollection
  • QuantityUnitController
  • QuantityUnitFactory
  • QuantityUnitReadService
  • QuantityUnitRepository
  • QuantityUnitsApiV2Controller
  • QuantityUnitServiceFactory
  • QuantityUnitStorage
  • QuantityUnitWriteService
  • QuickEditDocuments
  • QuickEditOverviewAjaxController
  • QuickEditOverviewColumns
  • QuickEditOverviewController
  • QuickEditOverviewTooltips
  • QuickEditProductGraduatedPricesReader
  • QuickEditProductGraduatedPricesRepository
  • QuickEditProductListItem
  • QuickEditProductPropertiesAjaxController
  • QuickEditProductPropertiesListItem
  • QuickEditProductPropertiesReader
  • QuickEditProductPropertiesRepository
  • QuickEditProductPropertiesWriter
  • QuickEditProductSpecialPriceListItem
  • QuickEditProductSpecialPricesReader
  • QuickEditProductSpecialPricesRepository
  • QuickEditProductSpecialPricesWriter
  • QuickEditPropertiesOverviewColumns
  • QuickEditPropertiesTooltips
  • QuickEditService
  • QuickEditServiceFactory
  • QuickEditSpecialPricesAjaxController
  • QuickEditSpecialPricesOverviewColumns
  • QuickEditSpecialPriceTooltips
  • RedirectHttpControllerResponse
  • ResponsiveFilemanagerController
  • ResponsiveFileManagerModuleCenterModule
  • ResponsiveFileManagerModuleCenterModuleController
  • SessionTimeoutAjaxController
  • SharedShoppingCartConfigurationController
  • SharedShoppingCartController
  • SharedShoppingCartDeleter
  • SharedShoppingCartModuleCenterModule
  • SharedShoppingCartModuleCenterModuleController
  • SharedShoppingCartReader
  • SharedShoppingCartRepository
  • SharedShoppingCartService
  • SharedShoppingCartSettings
  • SharedShoppingCartWriter
  • ShipcloudController
  • ShipcloudModuleCenterModule
  • ShipcloudModuleCenterModuleController
  • ShippingTitleProvider
  • ShopInformationApiV2Controller
  • ShopKeyController
  • Slide
  • SlideCollection
  • SlideImage
  • SlideImageArea
  • SlideImageAreaCollection
  • SlideImageAreaRepository
  • SlideImageAreaRepositoryDeleter
  • SlideImageAreaRepositoryReader
  • SlideImageAreaRepositoryWriter
  • SlideImageCollection
  • SlideImageFileStorage
  • SlideImageRepository
  • SlideImageRepositoryDeleter
  • SlideImageRepositoryReader
  • SlideImageRepositoryWriter
  • Slider
  • SliderAssignmentRepository
  • SliderCollection
  • SlideRepository
  • SlideRepositoryDeleter
  • SlideRepositoryReader
  • SlideRepositoryWriter
  • SliderJsonSerializer
  • SliderReadService
  • SliderRepository
  • SliderRepositoryDeleter
  • SliderRepositoryReader
  • SliderRepositoryWriter
  • SlidersDetailsAjaxController
  • SlidersDetailsController
  • SliderServiceFactory
  • SlidersOverviewAjaxController
  • SlidersOverviewController
  • SliderWriteService
  • Smarty_Resource_Get_Usermod
  • StaticCrossCuttingLoader
  • StaticGXCoreLoader
  • StaticSeoUrl
  • StaticSeoUrlAjaxController
  • StaticSeoUrlCollection
  • StaticSeoUrlContent
  • StaticSeoUrlContentCollection
  • StaticSeoUrlContentRepository
  • StaticSeoUrlContentRepositoryDeleter
  • StaticSeoUrlContentRepositoryReader
  • StaticSeoUrlContentRepositoryWriter
  • StaticSeoUrlController
  • StaticSeoUrlReadService
  • StaticSeoUrlRepository
  • StaticSeoUrlRepositoryDeleter
  • StaticSeoUrlRepositoryReader
  • StaticSeoUrlRepositoryWriter
  • StaticSeoUrlServiceFactory
  • StaticSeoUrlWriteService
  • StatisticsService
  • StoredCategory
  • StoredOrderItem
  • StoredOrderItemAttribute
  • StoredOrderItemAttributeCollection
  • StoredOrderItemCollection
  • StoredOrderItemProperty
  • StoredOrderTotal
  • StoredOrderTotalCollection
  • StoredProduct
  • StoredProductAttribute
  • StoredProductAttributeCollection
  • StringCollection
  • StringHelper
  • StringType
  • StyleEdit3AuthenticationController
  • TaxClassesApiV2Controller
  • TaxRatesApiV2Controller
  • TaxZonesApiV2Controller
  • TemplateConfigurationController
  • TrustedShopsModuleCenterModule
  • TrustedShopsModuleCenterModuleController
  • UnknownCustomerCountry
  • UploadedFile
  • UrlRewrite
  • UrlRewriteCollection
  • UrlRewriteStorage
  • UserConfigurationController
  • UserConfigurationReader
  • UserConfigurationService
  • UserConfigurationWriter
  • UsernamePasswordCredentials
  • VatNumberValidator
  • VersionInfoController
  • VersionInfoDatabaseItem
  • VersionInfoDatabaseReader
  • VersionInfoFileItem
  • VersionInfoFileReader
  • VersionInfoItemFactory
  • VersionInfoRepository
  • VersionInfoService
  • VersionInfoServiceFactory
  • VPE
  • VPEAjaxController
  • VpeApiV2Controller
  • VPECollection
  • VPEController
  • VPEFactory
  • VPEReadService
  • VPERepository
  • VPEServiceFactory
  • VPEStorage
  • VPEWriteService
  • WishListController
  • WritableDirectory
  • WritableFile
  • YategoModuleCenterModule
  • YategoModuleCenterModuleController
  • YoochooseModuleCenterModule
  • YoochooseModuleCenterModuleController
  • ZoneJsonSerializer
  • ZonesApiV2Controller
  • ZonesController

Interfaces

  • AddonValueContainerInterface
  • AddonValueServiceInterface
  • AddonValueStorageFactoryInterface
  • AddressBlockInterface
  • AddressBookServiceInterface
  • AddressClassInterface
  • AddressFormatProviderInterface
  • AdminStatusOnlyInterface
  • AssetCollectionInterface
  • AssetInterface
  • AttachmentCollectionInterface
  • AttachmentNameInterface
  • AttachmentPathInterface
  • AttachmentsHandlerInterface
  • AuthCredentialsInterface
  • AuthFactoryInterface
  • AuthServiceInterface
  • AuthSettingsInterface
  • AuthStrategyInterface
  • CacheTokenHelperInterface
  • CategoryFactoryInterface
  • CategoryInterface
  • CategoryListProviderFactoryInterface
  • CategoryListProviderInterface
  • CategoryObjectServiceInterface
  • CategoryReadServiceInterface
  • CategoryRepositoryDeleterInterface
  • CategoryRepositoryInterface
  • CategoryRepositoryReaderInterface
  • CategoryRepositoryWriterInterface
  • CategoryServiceSettingsInterface
  • CategorySettingsInterface
  • CategorySettingsRepositoryInterface
  • CategorySettingsRepositoryReaderInterface
  • CategorySettingsRepositoryWriterInterface
  • CategoryWriteServiceInterface
  • ClassFinderInterface
  • ClassFinderSettingsInterface
  • ContactCollectionInterface
  • ContactNameInterface
  • ContactTypeInterface
  • ContentNavigationCollectionInterface
  • ContentViewInterface
  • CountryServiceInterface
  • CrossCuttingLoaderInterface
  • CrossCuttingObjectInterface
  • CustomerAccountInputValidatorInterface
  • CustomerAdditionalAddressInfoInterface
  • CustomerAddressDeleterInterface
  • CustomerAddressInputValidatorInterface
  • CustomerAddressInterface
  • CustomerAddressReaderInterface
  • CustomerAddressRepositoryInterface
  • CustomerAddressWriterInterface
  • CustomerB2BStatusInterface
  • CustomerCallNumberInterface
  • CustomerCityInterface
  • CustomerCompanyInterface
  • CustomerCountryInterface
  • CustomerCountryIso2Interface
  • CustomerCountryIso3Interface
  • CustomerCountryNameInterface
  • CustomerCountryReaderInterface
  • CustomerCountryRepositoryInterface
  • CustomerCountryZoneInterface
  • CustomerCountryZoneIsoCodeInterface
  • CustomerCountryZoneNameInterface
  • CustomerCountryZoneReaderInterface
  • CustomerCountryZoneRepositoryInterface
  • CustomerDeleterInterface
  • CustomerEmailInterface
  • CustomerFirstnameInterface
  • CustomerGenderInterface
  • CustomerGroupAccessRepositoryInterface
  • CustomerGroupCollectionSerializerInterface
  • CustomerGroupConfigurationsInterface
  • CustomerGroupConfigurationsSerializerInterface
  • CustomerGroupDeleterInterface
  • CustomerGroupInterface
  • CustomerGroupReaderInterface
  • CustomerGroupReadServiceInterface
  • CustomerGroupRepositoryInterface
  • CustomerGroupSerializerInterface
  • CustomerGroupSettingsInterface
  • CustomerGroupSettingsSerializerInterface
  • CustomerGroupWriterInterface
  • CustomerGroupWriteServiceInterface
  • CustomerHouseNumberInterface
  • CustomerInputValidatorInterface
  • CustomerInputValidatorSettingsInterface
  • CustomerInterface
  • CustomerLastnameInterface
  • CustomerNumberInterface
  • CustomerPasswordInterface
  • CustomerPostcodeInterface
  • CustomerReaderInterface
  • CustomerReadServiceInterface
  • CustomerRegistrationInputValidatorServiceInterface
  • CustomerRepositoryInterface
  • CustomerServiceInterface
  • CustomerServiceSettingsInterface
  • CustomerStatusHelperInterface
  • CustomerStatusProviderInterface
  • CustomerStreetInterface
  • CustomerSuburbInterface
  • CustomerVatNumberInterface
  • CustomerWriterInterface
  • CustomerWriteServiceInterface
  • EmailAddressInterface
  • EmailAttachmentInterface
  • EmailCollectionInterface
  • EmailContactInterface
  • EmailContentInterface
  • EmailDeleterInterface
  • EmailFactoryInterface
  • EmailInterface
  • EmailReaderInterface
  • EmailRepositoryInterface
  • EmailServiceInterface
  • EmailSubjectInterface
  • EmailWriterInterface
  • FilesystemHelperInterface
  • GXCoreLoaderInterface
  • GXCoreLoaderSettingsInterface
  • HttpContextInterface
  • HttpContextReaderInterface
  • HttpControllerResponseInterface
  • HttpDispatcherInterface
  • HttpResponseProcessorInterface
  • HttpServiceFactoryInterface
  • HttpServiceInterface
  • HttpViewControllerFactoryInterface
  • HttpViewControllerInterface
  • HttpViewControllerRegistryInterface
  • IdInterface
  • InfoBoxFactoryInterface
  • InfoBoxMessageInterface
  • InfoBoxRepositoryDeleterInterface
  • InfoBoxRepositoryInterface
  • InfoBoxRepositoryReaderInterface
  • InfoBoxRepositoryWriterInterface
  • InfoBoxServiceInterface
  • InvoiceArchiveReadServiceInterface
  • InvoiceArchiveWriteServiceInterface
  • InvoiceFileEntitlerInterface
  • InvoiceListGeneratorInterface
  • InvoiceRepositoryInterface
  • InvoiceServiceSettingsInterface
  • LanguageHelperInterface
  • LanguageProviderInterface
  • MailerAdapterInterface
  • ManufacturerDeleterInterface
  • ManufacturerInterface
  • ManufacturerReaderInterface
  • ManufacturerReadServiceInterface
  • ManufacturerRepositoryInterface
  • ManufacturerWriterInterface
  • ManufacturerWriteServiceInterface
  • ModuleCenterModuleCollectionInterface
  • ModuleCenterModuleInterface
  • OrderFactoryInterface
  • OrderInterface
  • OrderItemAttributeFactoryInterface
  • OrderItemAttributeInterface
  • OrderItemAttributeRepositoryDeleterInterface
  • OrderItemAttributeRepositoryFactoryInterface
  • OrderItemAttributeRepositoryInterface
  • OrderItemAttributeRepositoryReaderInterface
  • OrderItemAttributeRepositoryWriterInterface
  • OrderItemFactoryInterface
  • OrderItemInterface
  • OrderItemPropertyFactoryInterface
  • OrderItemPropertyRepositoryDeleterInterface
  • OrderItemPropertyRepositoryReaderInterface
  • OrderItemPropertyRepositoryWriterInterface
  • OrderItemRepositoryDeleterInterface
  • OrderItemRepositoryInterface
  • OrderItemRepositoryReaderInterface
  • OrderItemRepositoryWriterInterface
  • OrderListGeneratorInterface
  • OrderObjectServiceInterface
  • OrderPaymentTypeInterface
  • OrderReadServiceInterface
  • OrderRepositoryDeleterInterface
  • OrderRepositoryInterface
  • OrderRepositoryReaderInterface
  • OrderRepositoryWriterInterface
  • OrderServiceSettingsInterface
  • OrderShippingTypeInterface
  • OrderStatusDeleterInterface
  • OrderStatusFactoryInterface
  • OrderStatusHistoryReaderInterface
  • OrderStatusHistoryWriterInterface
  • OrderStatusInterface
  • OrderStatusReaderInterface
  • OrderStatusRepositoryInterface
  • OrderStatusServiceFactoryInterface
  • OrderStatusServiceInterface
  • OrderStatusWriterInterface
  • OrderTotalFactoryInterface
  • OrderTotalInterface
  • OrderTotalRepositoryDeleterInterface
  • OrderTotalRepositoryInterface
  • OrderTotalRepositoryReaderInterface
  • OrderTotalRepositoryWriterInterface
  • OrderWriteServiceInterface
  • ProductAttributeFactoryInterface
  • ProductAttributeInterface
  • ProductAttributeObjectServiceInterface
  • ProductAttributeRepositoryDeleterInterface
  • ProductAttributeRepositoryInterface
  • ProductAttributeRepositoryReaderInterface
  • ProductAttributeRepositoryWriterInterface
  • ProductAttributeServiceInterface
  • ProductCategoryLinkerInterface
  • ProductFactoryInterface
  • ProductImageContainerInterface
  • ProductImageContainerRepositoryInterface
  • ProductImageInterface
  • ProductImagePathsSettingsInterface
  • ProductImageProcessingInterface
  • ProductInterface
  • ProductListProviderFactoryInterface
  • ProductListProviderInterface
  • ProductObjectServiceInterface
  • ProductPermissionSetterInterface
  • ProductReadServiceInterface
  • ProductRepositoryDeleterInterface
  • ProductRepositoryInterface
  • ProductRepositoryReaderInterface
  • ProductRepositoryWriterInterface
  • ProductSettingsInterface
  • ProductSettingsRepositoryInterface
  • ProductSettingsRepositoryReaderInterface
  • ProductSettingsRepositoryWriterInterface
  • ProductWriteServiceInterface
  • QuantityUnitInterface
  • QuantityUnitReadServiceInterface
  • QuantityUnitRepositoryInterface
  • QuantityUnitStorageInterface
  • QuantityUnitWriteServiceInterface
  • QuickEditDocumentsInterface
  • QuickEditOverviewColumnsInterface
  • QuickEditOverviewTooltipsInterface
  • QuickEditProductGraduatedPricesReaderInterface
  • QuickEditProductGraduatedPricesRepositoryInterface
  • QuickEditProductPropertiesReaderInterface
  • QuickEditProductPropertiesRepositoryInterface
  • QuickEditProductPropertiesWriterInterface
  • QuickEditProductSpecialPricesReaderInterface
  • QuickEditProductSpecialPricesRepositoryInterface
  • QuickEditProductSpecialPricesWriterInterface
  • QuickEditPropertiesOverviewColumnsInterface
  • QuickEditPropertiesTooltipsInterface
  • QuickEditServiceFactoryInterface
  • QuickEditServiceInterface
  • QuickEditSpecialPricesOverviewColumnsInterface
  • QuickEditSpecialPriceTooltipsInterface
  • SerializerInterface
  • SharedShoppingCartDeleterInterface
  • SharedShoppingCartReaderInterface
  • SharedShoppingCartRepositoryInterface
  • SharedShoppingCartServiceInterface
  • SharedShoppingCartSettingsInterface
  • SharedShoppingCartWriterInterface
  • SlideImageAreaInterface
  • SlideImageAreaRepositoryDeleterInterface
  • SlideImageAreaRepositoryInterface
  • SlideImageAreaRepositoryReaderInterface
  • SlideImageAreaRepositoryWriterInterface
  • SlideImageInterface
  • SlideImagePathsSettingsInterface
  • SlideImageRepositoryDeleterInterface
  • SlideImageRepositoryInterface
  • SlideImageRepositoryReaderInterface
  • SlideImageRepositoryWriterInterface
  • SlideInterface
  • SliderAssignmentRepositoryInterface
  • SlideRepositoryDeleterInterface
  • SlideRepositoryInterface
  • SlideRepositoryReaderInterface
  • SlideRepositoryWriterInterface
  • SliderInterface
  • SliderReadServiceInterface
  • SliderRepositoryDeleterInterface
  • SliderRepositoryInterface
  • SliderRepositoryReaderInterface
  • SliderRepositoryWriterInterface
  • SliderWriteServiceInterface
  • StaticSeoUrlContentInterface
  • StaticSeoUrlContentRepositoryDeleterInterface
  • StaticSeoUrlContentRepositoryInterface
  • StaticSeoUrlContentRepositoryReaderInterface
  • StaticSeoUrlContentRepositoryWriterInterface
  • StaticSeoUrlInterface
  • StaticSeoUrlReadServiceInterface
  • StaticSeoUrlRepositoryDeleterInterface
  • StaticSeoUrlRepositoryInterface
  • StaticSeoUrlRepositoryReaderInterface
  • StaticSeoUrlRepositoryWriterInterface
  • StaticSeoUrlWriteServiceInterface
  • StatisticsServiceInterface
  • StoredCategoryInterface
  • StoredOrderItemAttributeInterface
  • StoredOrderItemInterface
  • StoredOrderTotalInterface
  • StoredProductAttributeInterface
  • StoredProductInterface
  • StringHelperInterface
  • UrlKeywordsRepairerInterface
  • UserConfigurationReaderInterface
  • UserConfigurationServiceInterface
  • UserConfigurationWriterInterface
  • VatNumberValidatorInterface
  • VersionInfoItemInterface
  • VPEInterface
  • VPEReadServiceInterface
  • VPERepositoryInterface
  • VPEStorageInterface
  • VPEWriteServiceInterface

Traits

  • ContentManagerContentNavigationTrait

Exceptions

  • AjaxException
  • AttachmentNotFoundException
  • EntityNotFoundException
  • FileNotFoundException
  • GeschaeftskundenversandProductException
  • GeschaeftskundenversandShipmentException
  • GeschaeftskundenversandShipmentInvalidExportTypeException
  • GeschaeftskundenversandShipmentInvalidTermsOfTradeException
  • GeschaeftskundenversandSoapAdapterCigCredentialsMissingException
  • GeschaeftskundenversandSoapAdapterException
  • GeschaeftskundenversandSoapAdapterServiceUnavailableException
  • HttpApiV2Exception
  • InvalidCustomerDataException
  • InvalidEkpFormatException
  • InvalidGKVAttendanceFormatException
  • InvalidGKVProductTypeException
  • MissingControllerNameException
  • OrderStatusIdExistsException
  • OrderStatusIdNotExistsException
  • OrderStatusNotFoundException
  • UnknownEnvironmentException

Functions

  • smarty_function_check_magna_execute
  • smarty_function_check_mailbeez_menu
  • smarty_function_get_sub_categories
  • smarty_function_gm_footer
  • smarty_function_gm_get_conf
  • smarty_function_gm_gmotion
  • smarty_function_gm_gprint
  • smarty_function_gm_menuboxes
  • smarty_function_html_shop_offline
  • smarty_function_is_filemanager_available
  • smarty_function_load_env_array
  • smarty_function_load_language_text
  • smarty_function_object_product_list
  • smarty_function_page_url
  • smarty_function_pre_black_container
  • smarty_modifier_gm_get_conf
  • smarty_modifier_gm_get_env_info
  • smarty_modifier_has_children
  • smarty_modifier_htmlentities_wrapper
  • smarty_modifier_shop_url
  • smarty_modifier_xtc_href_link
  • smarty_outputfilter_note
  • smarty_php_tag
  1   2   3   4   5   6   7   8   9  10  11  12  13  14  15  16  17  18  19  20  21  22  23  24  25  26  27  28  29  30  31  32  33  34  35  36  37  38  39  40  41  42  43  44  45  46  47  48  49  50  51  52  53  54  55  56  57  58  59  60  61  62  63  64  65  66  67  68  69  70  71  72  73  74  75  76  77  78  79  80  81  82  83  84  85  86  87  88  89  90  91  92  93  94  95  96  97  98  99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 
<?php
/* --------------------------------------------------------------
 ContentManagerProductContentsController.inc.php 2017-10-10
 Gambio GmbH
 http://www.gambio.de
 Copyright (c) 2017 Gambio GmbH
 Released under the GNU General Public License (Version 2)
 [http://www.gnu.org/licenses/gpl-2.0.html]
 --------------------------------------------------------------
 */

/**
 * Class ContentManagerProductContentsController
 *
 * @category System
 * @package  AdminHttpViewControllers
 */
class ContentManagerProductContentsController extends AdminHttpViewController
{
    use ContentManagerContentNavigationTrait;
    
    /**
     * @var \UserConfigurationService
     */
    protected $userConfigurationService;
    
    /**
     * @var \LanguageTextManager
     */
    protected $languageTextManager;
    
    /**
     * @var \LanguageProvider
     */
    protected $languageProvider;
    
    /**
     * @var \CI_DB_query_builder
     */
    protected $queryBuilder;
    
    /**
     * @var NonEmptyStringType
     */
    protected $title;
    
    /**
     * @var array
     */
    protected $descriptionFields = [
        'title',
        'content'
    ];
    
    /**
     * @var array
     */
    protected $resourceFields = [
        'file',
        'link'
    ];
    
    
    /**
     * Initialize Controller
     */
    public function init()
    {
        $this->userConfigurationService = StaticGXCoreLoader::getService('UserConfiguration');
        $this->languageTextManager      = MainFactory::create('LanguageTextManager', 'content_manager',
                                                              $_SESSION['languages_id']);
        $this->queryBuilder             = StaticGXCoreLoader::getDatabaseQueryBuilder();
        $this->languageProvider         = MainFactory::create('LanguageProvider', $this->queryBuilder);
        $this->title                    = new NonEmptyStringType($this->languageTextManager->get_text('HEADING_TITLE'));
    }
    
    
    /**
     * Default actions, renders the content manager product contents overview.
     *
     * @return \AdminLayoutHttpControllerResponse
     */
    public function actionDefault()
    {
        $this->_setExpertMode();
        
        $template = new ExistingFile(new NonEmptyStringType(DIR_FS_ADMIN
                                                            . '/html/content/content_manager/product_contents/overview.html'));
        
        $data = MainFactory::create('KeyValueCollection', [
            'product_contents' => $this->_getOverviewData(),
        ]);
        
        return MainFactory::create('AdminLayoutHttpControllerResponse', $this->title, $template, $data,
                                   $this->_getAssets(),
                                   $this->_createContentNavigation($this->languageTextManager, 'productContents'));
    }
    
    
    public function actionEdit()
    {
        $this->_setExpertMode();
        
        $template = new ExistingFile(new NonEmptyStringType(DIR_FS_ADMIN
                                                            . '/html/content/content_manager/product_contents/edit.html'));
        
        $editData               = $this->_getEditData();
        $editData['groupCheck'] = GROUP_CHECK ? $this->_getProductContentCustomerGroups() : '';
        
        $data = MainFactory::create('KeyValueCollection', [
            'content_manager' => $editData,
            'contentType'     => $editData['type']
        ]);
        
        $contentData = $data->getValue('content_manager')[$data->getValue('contentType')];
        
        $title = new NonEmptyStringType($this->languageTextManager->get_text('CONTENT_TITLE') . ': '
                                        . $contentData['internal_name']);
        
        return MainFactory::create('AdminLayoutHttpControllerResponse', $title, $template, $data, $this->_getAssets(),
                                   $this->_createContentNavigation($this->languageTextManager, 'productContents'));
    }
    
    
    protected function _getProductContentCustomerGroups()
    {
        if(GROUP_CHECK)
        {
            $groupCheck     = [];
            $groupCheckData = $this->queryBuilder->select('customer_status_id')
                                                 ->from('product_content_customer_status')
                                                 ->where('product_content_id', $this->_getQueryParameter('id'))
                                                 ->get()
                                                 ->result_array();
            
            if(count($groupCheckData) === 0)
            {
                return '';
            }
            
            foreach($groupCheckData as $customerStatusId)
            {
                $groupCheck[] = $customerStatusId['customer_status_id'];
            }
            
            return implode(',', $groupCheck);
        }
        
        return '';
    }
    
    
    /**
     * Saves product content file data.
     *
     * @return \RedirectHttpControllerResponse
     */
    public function actionSaveFile()
    {
        $this->_setExpertMode();
        
        return $this->_insertProductContentPostData('file');
    }
    
    
    /**
     * Saves product content link data.
     *
     * @return \RedirectHttpControllerResponse
     */
    public function actionSaveLink()
    {
        $this->_setExpertMode();
        
        return $this->_insertProductContentPostData('link');
    }
    
    
    /**
     * Return the form for creating a new product content.
     *
     * @return \AdminLayoutHttpControllerResponse|bool
     */
    public function actionNew()
    {
        $this->_setExpertMode();
        
        $template = new ExistingFile(new NonEmptyStringType(DIR_FS_ADMIN
                                                            . '/html/content/content_manager/product_contents/edit.html'));
        
        $ckIdentifier = [
            'file' => [],
            'link' => [],
        ];
        $ckTypes      = [
            'file' => [],
            'link' => [],
        ];
        foreach(['file', 'link'] as $type)
        {
            foreach($this->languageProvider->getCodes()->getArray() as $languageCode)
            {
                $languageCode                       = $languageCode->asString();
                $ckIdentifier[$type][$languageCode] = 'content-manager-product-content-' . $type . '-new-content-'
                                                      . $languageCode;
                $ckTypes[$type][$languageCode]      = $this->userConfigurationService->getUserConfiguration(new IdType(0),
                                                                                                            $ckIdentifier[$type][$languageCode]) ? : 'ckeditor';
            }
        }
        
        $data = MainFactory::create('KeyValueCollection', [
            'contentType'     => $this->_getQueryParameter('type'),
            'content_manager' => [
                'filemanager_available' => $this->_isFilemanagerAvailable(),
                'filelist'              => $this->_getProductsContentFiles(),
                'link'                  => [
                    'form_action' => 'admin.php?do=ContentManagerProductContents/saveLink',
                    'ckeditor'    => [
                        'identifier' => $ckIdentifier['link'],
                        'type'       => $ckTypes['link'],
                    ],
                ],
                'file'                  => [
                    'form_action' => 'admin.php?do=ContentManagerProductContents/saveFile',
                    'ckeditor'    => [
                        'identifier' => $ckIdentifier['file'],
                        'type'       => $ckTypes['file'],
                    ],
                ],
                'groupCheck' => 'all'
            ],
        ]);
        
        $title = new NonEmptyStringType($this->languageTextManager->get_text('NEW_CONTENT_TITLE'));
        
        return MainFactory::create('AdminLayoutHttpControllerResponse', $title, $template, $data, $this->_getAssets(),
                                   $this->_createContentNavigation($this->languageTextManager, 'productContents'));
    }
    
    
    /**
     * Returns the form to edit the product file content
     *
     * @return \AdminLayoutHttpControllerResponse|bool
     */
    public function actionEditFile()
    {
        $this->_setExpertMode();
        
        $template = new ExistingFile(new NonEmptyStringType(DIR_FS_ADMIN
                                                            . '/html/content/content_manager/product_contents/edit.html'));
        
        $data = MainFactory::create('KeyValueCollection', [
            'content_manager' => $this->_getEditData(),
            'contentType'     => 'file'
        ]);
        
        return MainFactory::create('AdminLayoutHttpControllerResponse', $this->title, $template, $data,
                                   $this->_getAssets(),
                                   $this->_createContentNavigation($this->languageTextManager, 'productContents'));
    }
    
    
    /**
     * Returns the form to edit the product link content
     *
     * @return \AdminLayoutHttpControllerResponse|bool
     */
    public function actionEditLink()
    {
        $this->_setExpertMode();
        
        $template = new ExistingFile(new NonEmptyStringType(DIR_FS_ADMIN
                                                            . '/html/content/content_manager/product_contents/edit.html'));
        
        $data = MainFactory::create('KeyValueCollection', [
            'content_manager' => $this->_getEditData(),
            'contentType'     => 'link'
        ]);
        
        return MainFactory::create('AdminLayoutHttpControllerResponse', $this->title, $template, $data,
                                   $this->_getAssets(),
                                   $this->_createContentNavigation($this->languageTextManager, 'productContents'));
    }
    
    
    public function actionUpdate()
    {
        $this->_setExpertMode();
        
        $type             = $this->_getPostData('type');
        $productContentId = $this->_getQueryParameter('id');
        
        $productContentDescriptionData = $this->_updateIntoProductContentsAndReturnInsertId($type)
                                              ->_updateIntoProductContentProducts($productContentId, $type)
                                              ->_prepareProductContentDescriptionData($productContentId, $type);
        $productContentResourcesData   = $this->_prepareProductContentResourceData($type);
        
        if(GROUP_CHECK)
        {
            $this->queryBuilder->delete('product_content_customer_status', ['product_content_id' => $productContentId]);
            
            if ($this->_getPostData('content_manager')[$type]['group_check']) {
                foreach($this->_getPostData('content_manager')[$type]['group_check'] as $customerStatusId)
                {
                    if($customerStatusId !== 'all')
                    {
                        $this->queryBuilder->insert('product_content_customer_status', [
                            'product_content_id' => $productContentId,
                            'customer_status_id' => $customerStatusId
                        ]);
                    }
                }
            }
        }
        
        return $this->_updateIntoProductContentDescriptionsAndResources($productContentDescriptionData,
                                                                        $productContentResourcesData)
                    ->_getUpdateResponse('ContentManagerProductContents', $productContentId, 'edit');
    }
    
    
    protected function _insertIntoProductContentsAndReturnInsertId($type)
    {
        $postData            = $this->_getPostData('content_manager')[$type];
        $productContentsData = [
            'name' => $postData['internal_name']
        ];
        
        $this->queryBuilder->insert('product_contents', $productContentsData);
        
        return $this->queryBuilder->insert_id();
    }
    
    
    protected function _updateIntoProductContentsAndReturnInsertId($type)
    {
        $postData            = $this->_getPostData('content_manager')[$type];
        $productContentsData = [
            'name' => $postData['internal_name']
        ];
        
        $this->queryBuilder->update('product_contents', $productContentsData,
                                    ['id' => $this->_getQueryParameter('id')]);
        
        return $this;
    }
    
    
    protected function _insertIntoProductContentProducts($productContentId, $type)
    {
        $postData        = $this->_getPostData('content_manager')[$type];
        $alreadyInserted = [];
        
        foreach($postData['products'] as $productId)
        {
            if($productId > 0 && !in_array($productId, $alreadyInserted))
            {
                $this->queryBuilder->insert('product_content_products', [
                    'product_content_id' => $productContentId,
                    'product_id'         => $productId
                ]);
                $alreadyInserted[] = $productId;
            }
        }
        
        return $this;
    }
    
    
    protected function _updateIntoProductContentProducts($productContentId, $type)
    {
        // remove all attachments first
        $this->queryBuilder->delete('product_content_products',
                                    ['product_content_id' => $this->_getQueryParameter('id')]);
        $postData        = $this->_getPostData('content_manager')[$type];
        $alreadyInserted = [];
        
        foreach($postData['products'] as $productId)
        {
            if($productId > 0 && !in_array($productId, $alreadyInserted))
            {
                $this->queryBuilder->insert('product_content_products', [
                    'product_content_id' => $productContentId,
                    'product_id'         => $productId
                ]);
                $alreadyInserted[] = $productId;
            }
        }
        
        return $this;
    }
    
    
    protected function _prepareProductContentDescriptionData($productContentId, $type)
    {
        $productContentDescriptionData = [];
        $postData                      = $this->_getPostData('content_manager')[$type];
        
        foreach($this->descriptionFields as $field)
        {
            // do not loop over internal_name value
            if(is_array($postData[$field]))
            {
                foreach($postData[$field] as $languageCode => $value)
                {
                    $languageId = $this->languageProvider->getIdByCode(new LanguageCode(new StringType($languageCode)));
                    
                    $productContentDescriptionData[$languageId]['product_content_id'] = $productContentId;
                    $productContentDescriptionData[$languageId]['language_id']        = $languageId;
                    
                    $productContentDescriptionData[$languageId][$field] = $value;
                }
            }
        }
        
        return $productContentDescriptionData;
    }
    
    
    protected function _prepareProductContentResourceData($type)
    {
        $productContentResourceData = [];
        $postData                   = $this->_getPostData('content_manager')[$type];
        
        if($this->_isFilemanagerAvailable() === false && $type === 'file')
        {
            $postData['file'] = $this->_checkProductContentFileUploads();
        }
        
        foreach($this->resourceFields as $field)
        {
            if(is_array($postData[$field]))
            {
                foreach($postData[$field] as $languageCode => $value)
                {
                    $languageId = $this->languageProvider->getIdByCode(new LanguageCode(new StringType($languageCode)));
                    
                    $productContentResourceData[$languageId]['resource'] = $value;
                }
            }
        }
        
        return $productContentResourceData;
    }
    
    
    protected function _insertIntoProductContentDescriptionsAndResources(array $productContentDescriptionData,
                                                                         array $productContentResourceData,
                                                                         $type)
    {
        $types = [
            'file' => 1,
            'link' => 2
        ];
        
        foreach($productContentDescriptionData as $key => $productContentDescriptionDataSet)
        {
            $this->queryBuilder->insert('product_content_descriptions', $productContentDescriptionDataSet);
            
            $productContentDescriptionId   = $this->queryBuilder->insert_id();
            $productContentResourceDataSet = $productContentResourceData[$key];
            
            $productContentResourceDataSet['product_content_description_id'] = $productContentDescriptionId;
            $productContentResourceDataSet['product_content_types_id']       = $types[$type];
            $this->queryBuilder->insert('product_content_resources', $productContentResourceDataSet);
        }
        
        return $this;
    }
    
    
    protected function _updateIntoProductContentDescriptionsAndResources(array $productContentDescriptionData,
                                                                         array $productContentResourceData)
    {
        $productContentId = $this->_getQueryParameter('id');
        
        foreach($productContentDescriptionData as $key => $productContentDescriptionDataSet)
        {
            $this->queryBuilder->update('product_content_descriptions', $productContentDescriptionDataSet, [
                'product_content_id' => $productContentId,
                'language_id'        => $productContentDescriptionDataSet['language_id']
            ]);
            
            $productContentDescriptionId = $this->queryBuilder->select()
                                                              ->from('product_content_descriptions')
                                                              ->where([
                                                                          'product_content_id' => $productContentId,
                                                                          'language_id'        => $productContentDescriptionDataSet['language_id']
                                                                      ])
                                                              ->get()
                                                              ->row_array()['id'];
            
            $productContentResourceDataSet = $productContentResourceData[$key];
            
            $this->queryBuilder->update('product_content_resources', $productContentResourceDataSet,
                                        ['product_content_description_id' => $productContentDescriptionId]);
        }
        
        return $this;
    }
    
    
    protected function _insertProductContentPostData($type)
    {
        $productContentId = $this->_insertIntoProductContentsAndReturnInsertId($type);
        
        $productContentDescriptionData = $this->_insertIntoProductContentProducts($productContentId, $type)
                                              ->_prepareProductContentDescriptionData($productContentId, $type);
        $productContentResourceData    = $this->_prepareProductContentResourceData($type);
        
        if(GROUP_CHECK && $this->_getPostData('content_manager')[$type]['group_check'])
        {
            $this->queryBuilder->delete('product_content_customer_status', ['product_content_id' => $productContentId]);
            foreach($this->_getPostData('content_manager')[$type]['group_check'] as $customerStatusId)
            {
                if($customerStatusId !== 'all')
                {
                    $this->queryBuilder->insert('product_content_customer_status', [
                        'product_content_id' => $productContentId,
                        'customer_status_id' => $customerStatusId
                    ]);
                }
            }
        }
        
        return $this->_insertIntoProductContentDescriptionsAndResources($productContentDescriptionData,
                                                                        $productContentResourceData, $type)
                    ->_getUpdateResponse('ContentManagerProductContents', $productContentId);
    }
    
    
    /**
     * Return the data for the products content overview.
     *
     * @return array
     */
    protected function _getOverviewData()
    {
        $data = $this->queryBuilder->select('pc.id as group_id, pc.name as internal_name, pct.name as type, COUNT(pcp.product_id) as usage_count')
                                   ->from('product_contents as pc')
                                   ->join('product_content_products as pcp', 'pc.id = pcp.product_content_id', 'left')
                                   ->join('product_content_descriptions as pcd', 'pc.id = pcd.product_content_id')
                                   ->join('product_content_resources as pcr',
                                          'pcd.id = pcr.product_content_description_id')
                                   ->join('product_content_types as pct', 'pct.id = pcr.product_content_types_id')
                                   ->where('language_id',
                                           $_SESSION['languages_id'])// Todo: Replace $_SESSION with lang selection
                                   ->group_by('pcp.product_content_id, type')
                                   ->get()
                                   ->result_array();
        
        // add description text
        foreach($data as $key => $dataSet)
        {
            $data[$key]['description'] = $this->languageTextManager->get_text('DESCRIPTION_PRODUCT_CONTENT_'
                                                                              . strtoupper($dataSet['type']));
        }
        
        return $data;
    }
    
    
    /**
     * Returns the type of a file by its file extension.
     *
     * @param $file
     *
     * @return string
     */
    protected function _getFileType($file)
    {
        $fileExtension = substr($file, strrpos($file, '.') + 1);
        switch($fileExtension)
        {
            case 'pdf':
                return 'pdf';
            case 'html':
            case 'php':
                return 'code';
            case 'txt':
            case 'doc':
            case 'docx':
                return 'text';
            case 'png':
            case 'jpg':
            case 'jpeg':
            case 'gif':
                return 'image';
            default:
                return 'unknown';
        }
    }
    
    
    protected function _getEditData()
    {
        $productContentEditData = $this->_getProductContentEditData();
        $products               = ['products' => $this->_getProductContentProducts()];
        $ckEditorData           = ['ckeditor' => $this->_getCkEditorData()];
        $formAction             = [
            'form_action' => 'admin.php?do=ContentManagerProductContents/update&id=' . $this->_getQueryParameter('id')
        ];
        
        $data = [
            $productContentEditData['type'] => array_merge($productContentEditData, $products, $ckEditorData,
                                                           $formAction),
            'filemanager_available'         => $this->_isFilemanagerAvailable(),
            'filelist'                      => $this->_getProductsContentFiles(),
            'type'                          => $productContentEditData['type']
        ];
        
        return $data;
    }
    
    
    protected function _getProductContentProducts()
    {
        $queryResult = $this->queryBuilder->select('product_id')
                                          ->from('product_content_products')
                                          ->where('product_content_id', $this->_getQueryParameter('id'))
                                          ->get()
                                          ->result_array();
        
        $products = [];
        foreach($queryResult as $product)
        {
            $products[] = $product['product_id'];
        }
        
        return implode(',', $products);
    }
    
    
    protected function _getProductContentEditData()
    {
        $data               = [];
        $productContentId   = $this->_getQueryParameter('id');
        $productContentData = $this->queryBuilder->select('pc.name as internal_name, pcd.title, pcd.content, pcd.language_id, pcr.resource, pct.name as type')
                                                 ->from('product_contents as pc')
                                                 ->join('product_content_descriptions as pcd',
                                                        'pc.id = pcd.product_content_id')
                                                 ->join('product_content_resources as pcr',
                                                        'pcd.id = pcr.product_content_description_id')
                                                 ->join('product_content_types as pct',
                                                        'pcr.product_content_types_id = pct.id')
                                                 ->where('pc.id', $productContentId)
                                                 ->get()
                                                 ->result_array();
        
        foreach($productContentData as $productContentDataSet)
        {
            $languageCode = $this->languageProvider->getCodeById(new IdType($productContentDataSet['language_id']))
                                                   ->asString();
            
            $data['internal_name']                               = $productContentDataSet['internal_name'];
            $data['type']                                        = $productContentDataSet['type'];
            $data['title'][$languageCode]                        = $productContentDataSet['title'];
            $data['content'][$languageCode]                      = $productContentDataSet['content'];
            $data[$productContentDataSet['type']][$languageCode] = $productContentDataSet['resource'];
        }
        
        return $data;
    }
    
    
    protected function _getCkEditorData()
    {
        $ckIdentifier = [];
        $ckTypes      = [];
        foreach($this->languageProvider->getCodes()->getArray() as $languageCode)
        {
            $languageCode                = $languageCode->asString();
            $ckIdentifier[$languageCode] = 'content-manager-product-content-link-content-'
                                           . $this->_getQueryParameter('id') . '-' . $languageCode;
            $ckTypes[$languageCode]      = $this->userConfigurationService->getUserConfiguration(new IdType(0),
                                                                                                 $ckIdentifier[$languageCode]) ? : 'ckeditor';
        }
        
        return [
            'identifier' => $ckIdentifier,
            'type'       => $ckTypes
        ];
    }
    
    
    /**
     * Detects file uploads for file product contents and returns the array for new file post data.
     *
     * @return array
     */
    protected function _checkProductContentFileUploads()
    {
        $return = $this->_getPostData('content_manager')['file']['file'];
        if(count($_FILES['content_manager']['name']['file']['file']) > 0)
        {
            foreach($_FILES['content_manager']['name']['file']['file'] as $key => $filename)
            {
                if(!empty($filename) && $_FILES['content_manager']['error']['file']['file'][$key] === 0)
                {
                    // move uploaded file into media/content directory
                    $directory    = DIR_FS_CATALOG . 'media' . DIRECTORY_SEPARATOR . 'products' . DIRECTORY_SEPARATOR;
                    $tempFilename = $_FILES['content_manager']['tmp_name']['file']['file'][$key];
                    move_uploaded_file($tempFilename, $directory . $filename);
                    
                    // update post data for selected content_file. set this value to the uploaded file.
                    $return[$key] = $filename;
                }
            }
        }
        
        return $return;
    }
}
API documentation generated by ApiGen