url
stringlengths
50
196
text
stringlengths
3
17.2k
heading
stringlengths
2
103
embeddings
list
https://pimcore.com/docs/platform//Pimcore/Development_Tools_and_Details/Testing/Core_Tests#important-environment-variables
Important Environment Variables Meaningful default values are set in the shipped docker-compose.yaml. Can be modified as needed. Env Variable Example Comment APP_ENV test Test environment PIMCORE_TEST 1 important this will switch several directories (like /var/classes) PIMCORE_TEST_SKIP_DB 1 Skips DB setup. ...
Important Environment Variables
[ -0.3722061216831207, -0.24646537005901337, -0.22580160200595856, -0.37734556198120117, 0.015631327405571938, -0.10663669556379318, 0.42614302039146423, 0.1376519799232483, 0.05263849347829819, 0.2846391201019287, -0.01953709125518799, 0.3194359838962555, 0.24933238327503204, 0.065972894430...
https://pimcore.com/docs/platform//Pimcore/Development_Tools_and_Details/Testing/Core_Tests#suites
Suites The tests are organized into suites, each one covering specific areas of the core. Suite name Description Cache Cache tests Model Dataobject tests Service Test covering common or shared element tasks (versioning, ...) Unit Other tests (may need restructuring) ...
Suites
[ -0.09724423289299011, -0.3648422658443451, -0.2899453639984131, -0.011501302942633629, -0.010806150734424591, 0.4384964108467102, 0.29603421688079834, 0.19307337701320648, 0.20480991899967194, -0.1441602259874344, 0.18819284439086914, -0.20868410170078278, -0.043816640973091125, 0.29834270...
https://pimcore.com/docs/platform//Pimcore/Development_Tools_and_Details/Testing/Core_Tests#groups
Groups The following table lists all groups currently used by Pimcore's core tests. If you extend the tests or write new ones please tag them accordingly. Group cache-cli Cache cli tests cache.core.array Cache Array handler tests cache.core.db Cache DB handler tests cache.core.file Cache File handler test...
Groups
[ -0.46692177653312683, -0.20217189192771912, -0.24898691475391388, -0.046270716935396194, -0.32794055342674255, 0.1801455169916153, 0.2902350127696991, 0.2712376117706299, 0.19172599911689758, 0.01898849382996559, -0.42458364367485046, 0.2658591568470001, 0.21948587894439697, -0.15477825701...
https://pimcore.com/docs/platform//Pimcore/Development_Tools_and_Details/Testing/Core_Tests#useful-command-line-options
Useful command line options Useful examples: Option Example Description --group (-g --group dataTypeLocal Only execute specified list of groups --skip (-s) --skip cache,rest Skip Cache and Rest Tests --skip-group (-x) --skip-group cache.core.file Skip file cache tests --fail-fast --fail-fast Stop on first ...
Useful command line options
[ -0.5185095071792603, 0.014512445777654648, -0.19573435187339783, -0.1575891673564911, -0.1764204204082489, 0.0661708191037178, 0.2592436671257019, 0.6053107976913452, 0.21650296449661255, 0.30510905385017395, -0.049236610531806946, 0.0043315584771335125, -0.1470515877008438, -0.11448315531...
https://pimcore.com/docs/platform//Pimcore/Development_Tools_and_Details/Testing/Core_Tests#providing-new-tests-&-extending-existing-ones
Providing new tests & extending existing ones In general, contributions in form extending and improving tests is highly appreciated. Please follow the structure and principles described above. If you have the extend the data model then please have a look at Model.php. There you will find all class definitions used ...
Providing new tests & extending existing ones
[ -0.1819828301668167, -0.041703350841999054, -0.3246181011199951, 0.045534633100032806, -0.17574496567249298, -0.032866332679986954, 0.07197696715593338, 0.2204301357269287, 0.02499421127140522, -0.10872004926204681, 0.17185808718204498, 0.02394244819879532, -0.18174266815185547, 0.04911155...
https://pimcore.com/docs/platform//Pimcore/Development_Tools_and_Details/Testing/Core_Tests#perform-phpstan-analysis
Perform PHPStan Analysis First, get a copy of this sample configuration file and place it in your root directory. Add dependencies: # minimum composer require "phpstan/phpstan:^0.12" "phpstan/phpstan-symfony:^0.12" # required if you want to do a full analysis composer require "elasticsearch/el...
Perform PHPStan Analysis
[ -0.24574314057826996, -0.1779312938451767, -0.20755590498447418, 0.24781771004199982, -0.02970457635819912, -0.2560707926750183, -0.16711653769016266, 0.24985647201538086, 0.2835789918899536, 0.3508431017398834, 0.24443231523036957, -0.0785302147269249, -0.24878312647342682, -0.15522755682...
https://pimcore.com/docs/platform//Pimcore/Development_Tools_and_Details/Testing/Core_Tests#phpstan-baseline-feature
PHPStan Baseline Feature PHPStan can create a baseline file, which contain all current errors. See this blog entry. To generate a new baseline file you have to execute following command: vendor/bin/phpstan analyse --memory-limit=-1 --generate-baseline With this baseline file include, we can detect new errors without h...
PHPStan Baseline Feature
[ -0.3627769649028778, -0.4524511694908142, -0.12880827486515045, 0.1507611870765686, -0.12745772302150726, -0.1405266374349594, 0.045331209897994995, 0.23223313689231873, 0.10784465074539185, 0.39092275500297546, 0.41347938776016235, -0.2902500331401825, -0.30400311946868896, -0.10503849387...
https://pimcore.com/docs/platform//Pimcore/Development_Tools_and_Details/Testing/Core_Tests#phpstan-level-overview
PHPStan Level Overview Level Checks 0 basic checks, unknown classes, unknown functions, unknown methods called on $this, wrong number of arguments passed to those methods and functions, always undefined variables 1 possibly undefined variables, unknown magic methods and properties on classes with __call and __...
PHPStan Level Overview
[ -0.1882389634847641, -0.35024428367614746, -0.10157007724046707, 0.2346729040145874, -0.039361897855997086, 0.033656664192676544, 0.06976134330034256, 0.3277030885219574, 0.06874014437198639, 0.1194736510515213, 0.3583671450614929, -0.1716081202030182, 0.08231886476278305, 0.13810661435127...
https://pimcore.com/docs/platform//Pimcore/Development_Tools_and_Details/Testing/Testing_Services#testing-symfony-services
Testing Symfony Services For integration tests of symfony services in context of their configuration in container, there are multiple ways for retrieving them directly from the symfony container (regardless if there are public or private). The symfony default way is described here and can be used in context within Pimc...
Testing Symfony Services
[ -0.3008776009082794, 0.12819567322731018, -0.04411130025982857, 0.09792236238718033, -0.16851095855236053, -0.20713210105895996, 0.5776588916778564, 0.09087583422660828, 0.053800277411937714, 0.4337228834629059, 0.06676194071769714, 0.23995064198970795, -0.18038803339004517, -0.05155803635...
https://pimcore.com/docs/platform//Pimcore/Development_Tools_and_Details/Testing#testing
Testing If you want to get a detailed introduction on how Pimcore applications can be tested have a look at Pimcore Application Testing If you want to execute and extend Pimcore's core test start with Core Tests.
Testing
[ -0.2768051326274872, -0.317055881023407, -0.32786622643470764, -0.002824396127834916, -0.14012478291988373, -0.07950516790151596, 0.007987193763256073, -0.1295987218618393, -0.17403548955917358, 0.1713818609714508, -0.04534720629453659, 0.4043812155723572, 0.16997332870960236, 0.0184225514...
https://pimcore.com/docs/platform//Pimcore/Development_Tools_and_Details/Extending_a_Backend_User#extending-the-pimcore-user
Extending the Pimcore User Pimcore does not allow to extend the user directly. Instead it allows to create a relation between a user and one or more Pimcore objects. This can be used to add information to a user or to associate one or more objects directly with a system user. This article presents an example where the ...
Extending the Pimcore User
[ -0.04981161281466484, -0.043757520616054535, -0.13439159095287323, 0.1223505288362503, 0.22434504330158234, -0.23465178906917572, 0.33417004346847534, -0.25816598534584045, -0.28076261281967163, 0.45764997601509094, -0.24869094789028168, 0.3460390269756317, 0.027303680777549744, -0.0957182...
https://pimcore.com/docs/platform//Pimcore/Development_Tools_and_Details/Working_with_Sessions#working-with-sessions
Working With Sessions If you need sessions, please use the native session handling provided by Symfony (configured through the framework.session config). For details see sessions docs. In case you need to add a custom session bag for your bundle or application, then implement an EventListener to register the session b...
Working With Sessions
[ -0.3029715120792389, -0.10183511674404144, -0.11574205756187439, 0.10780833661556244, -0.2850881516933441, -0.39155954122543335, 0.520611047744751, -0.13715313374996185, 0.03898901492357254, 0.14526908099651337, -0.16185875236988068, -0.08602326363325119, 0.08631811290979385, -0.1348619014...
https://pimcore.com/docs/platform//Pimcore/Development_Tools_and_Details/Working_with_Sessions#register-a-session-bag-through-eventlistener
Register a Session Bag through EventListener <?php namespace TestBundle\EventListener; use Symfony\Component\HttpFoundation\Session\Attribute\AttributeBag; use Symfony\Component\HttpFoundation\Session\SessionInterface; class SessionBagListener implements EventSubscriberInterface { public static function get...
Register a Session Bag through EventListener
[ -0.31665748357772827, -0.18047630786895752, -0.1030803695321083, 0.22732996940612793, 0.030470313504338264, -0.15923376381397247, 0.5144401788711548, 0.26093289256095886, 0.09049389511346817, 0.2917761504650116, -0.07666248083114624, 0.11461502313613892, -0.10653980076313019, -0.1580382138...
https://pimcore.com/docs/platform//Pimcore/Development_Tools_and_Details/Working_with_Sessions#usage-of-configured-session,-e.g.-in-controller
Usage of Configured Session, e.g. in Controller <?php if ($request->hasSession()) { $session = $request->getSession(); /** @var AttributeBag $bag */ $bag = $session->getBag('session_cart'); $bag->set('foo', 1); } Symfony framework session is configured by default, so you don't need...
Usage of Configured Session, e.g. in Controller
[ -0.29025882482528687, -0.2939854860305786, -0.0735878050327301, 0.33825254440307617, 0.09535549581050873, -0.23401665687561035, 0.5227801203727722, 0.015009669587016106, -0.055006515234708786, 0.2586049437522888, -0.12728287279605865, 0.21148571372032166, 0.21259671449661255, -0.1144029498...
https://pimcore.com/docs/platform//Pimcore/Development_Tools_and_Details/Migrations#migrations
Migrations A common tasks in evolving applications is the need to migrate data and data structures to a specific format. Common examples are adding a new column to a database table or changing data. To be able to execute migration changes across environments, Pimcore integrates the Doctrine Migrations Bundle library wh...
Migrations
[ -0.3334414064884186, 0.13702379167079926, -0.1801958531141281, -0.034041084349155426, -0.11996399611234665, -0.3516748249530792, -0.18435274064540863, 0.09113263338804245, -0.5230245590209961, 0.1648978292942047, -0.14533399045467377, 0.44052785634994507, -0.02990560606122017, 0.2978353798...
https://pimcore.com/docs/platform//Pimcore/Development_Tools_and_Details/Migrations#example-commands
Example Commands # just run migrations of the Pimcore core ./bin/console doctrine:migrations:migrate --prefix=Pimcore\\Bundle\\CoreBundle # run migrations of a certain bundle ./bin/console doctrine:migrations:migrate --prefix=Vendor\\PimcoreExampleBundle # generate a project specific migration ./bin/console doctrine:...
Example Commands
[ -0.3637450337409973, 0.03840469568967819, -0.1808689832687378, -0.030080704018473625, 0.0012545567005872726, -0.1146974265575409, -0.003556744661182165, 0.13446560502052307, -0.6258852481842041, 0.14386509358882904, -0.05578785017132759, 0.60854572057724, 0.1239071637392044, 0.149300262331...
https://pimcore.com/docs/platform//Pimcore/Development_Tools_and_Details/Migrations#config-examples-for-your-project-(configconfig.yaml)
Config Examples for your Project (config/config.yaml) doctrine_migrations: migrations_paths: 'App\Migrations': '%kernel.project_dir%/src/Migrations'
Config Examples for your Project (config/config.yaml)
[ -0.25054022669792175, 0.08373485505580902, -0.18003033101558685, -0.14539735019207, 0.29757159948349, -0.21230420470237732, 0.010724104009568691, 0.1925380676984787, -0.41017311811447144, 0.07079007476568222, 0.21085147559642792, 0.2797357738018036, 0.0024447981268167496, 0.074420891702175...
https://pimcore.com/docs/platform//Pimcore/Development_Tools_and_Details/Migrations#run-all-available-migrations-after-composer-update
Run all available migrations after composer update If you'd like to run all available migrations after composer update including bundles and your app-specific migrations, just include the following part in your composer.json. "post-update-cmd": [ "./bin/console doctrine:migrations:migrate" ]
Run all available migrations after composer update
[ -0.5411590337753296, 0.35566282272338867, -0.2028862088918686, -0.19991041719913483, 0.2065773606300354, -0.21726921200752258, -0.13297535479068756, 0.2639192044734955, -0.6259644627571106, 0.029654486104846, 0.0570962131023407, 0.31866180896759033, -0.012584097683429718, -0.01707256957888...
https://pimcore.com/docs/platform//Pimcore/Development_Tools_and_Details/Preview_Scheduled_Content#preview-scheduled-content
Preview Scheduled Content In Document preview tab Pimcore can provide a time slider to preview content at any given time. To take advantage of this feature for you custom implementations (e.g. custom controller actions), use the OutputTimestampResolver service and get the timestamp from it instead of using the current ...
Preview Scheduled Content
[ -0.6283528208732605, -0.10195446014404297, -0.06399219483137131, -0.21098466217517853, -0.30448153614997864, -0.2908877432346344, 0.11325669288635254, 0.38919758796691895, -0.2362791895866394, 0.17793263494968414, -0.14475573599338531, 0.6565895676612854, -0.16266262531280518, 0.0197166707...
https://pimcore.com/docs/platform//Pimcore/Development_Tools_and_Details/Custom_Admin_Login_Entry_Point#custom-admin-login-entry-point
Custom Admin Login Entry Point Pimcore /admin login entry point can be restricted/changed by using pimcore configuration. Add custom admin identifier in your config/config.yaml: pimcore_admin: custom_admin_path_identifier: min20CharCustomToken Please note: custom_admin_path_identifier should be at least 20 chara...
Custom Admin Login Entry Point
[ -0.1872601956129074, -0.203754723072052, -0.024959908798336983, -0.08902248740196228, 0.25282907485961914, -0.39532899856567383, 0.2031679004430771, -0.10827812552452087, -0.12186648696660995, 0.0017819921486079693, -0.159225195646286, 0.2059706598520279, 0.04447893053293228, 0.14860792458...
https://pimcore.com/docs/platform//Pimcore/Development_Tools_and_Details/Settings_Store#settings-store
Settings Store The settings store is a simple key value store and allows to persist any kind of settings into the Pimcore database via API. There is no user interface for the Settings Store available. Compared to the TmpStore the settings do not have an expiry date and will not be cleaned up. Sample use cases for setti...
Settings Store
[ -0.3026023209095001, -0.45591509342193604, -0.0637161061167717, 0.15530166029930115, 0.2648976445198059, 0.2872334420681, -0.10153254121541977, -0.17573562264442444, -0.31745800375938416, -0.02819168008863926, -0.20285619795322418, 0.31093552708625793, -0.00391615042462945, 0.0751363858580...
https://pimcore.com/docs/platform//Pimcore/Development_Tools_and_Details/Settings_Store#sample-usage
Sample Usage Recommended // store or update setting (id, data, type, scope) SettingsStore::set('my-setting-id', 'this is some setting value', SettingsStore::TYPE_STRING, 'bundle-settings-1'); // load setting by id (id, scope) $setting = SettingsStore::get('my-setting-id', 'bundle-settings-1'); // load all settings i...
Sample Usage
[ -0.32727429270744324, -0.23894794285297394, -0.10392244905233383, 0.18826542794704437, 0.10595224797725677, 0.01424613781273365, 0.37091296911239624, 0.2745925486087799, -0.04243822768330574, 0.166073277592659, 0.0392090380191803, 0.20663750171661377, -0.1427544355392456, 0.050379067659378...
https://pimcore.com/docs/platform//Pimcore/Development_Tools_and_Details#development-tools-and-details
Development Tools and Details This section of documentation gives insights into development tools shipped with Pimcore (e.g. features that can be used by developers when creating solutions with Pimcore), shows some best practises and gives additional insights into how Pimcore works. The topics include insights to Datab...
Development Tools and Details
[ -0.05399590730667114, -0.322266161441803, -0.20771464705467224, 0.08596677333116531, -0.0879848375916481, -0.05920442193746567, 0.056036487221717834, -0.28136250376701355, -0.5112115740776062, 0.08154924213886261, 0.0857362300157547, 0.35611292719841003, 0.08873496949672699, 0.315526604652...
https://pimcore.com/docs/platform//Pimcore/Extending_Pimcore/Add_Your_Own_Dependencies_and_Packages#add-your-own-dependencies-and-packages
Add Your Own Dependencies and Packages Pimcore manages itself all dependencies using composer and therefore you can add your own dependencies by using standard composer functionalities.
Add Your Own Dependencies and Packages
[ -0.4232384264469147, -0.09321648627519608, -0.272198885679245, -0.0004702649894170463, -0.022146325558423996, -0.2616739273071289, 0.0072812954895198345, -0.15666455030441284, -0.2955905497074127, 0.3675312399864197, -0.1286768913269043, 0.5506932735443115, -0.19803456962108612, 0.21668350...
https://pimcore.com/docs/platform//Pimcore/Extending_Pimcore/Add_Your_Own_Dependencies_and_Packages#basic-example
Basic Example Use composer in your project root directory, eg. composer require mtdowling/cron-expression
Basic Example
[ -0.5313756465911865, -0.011290266178548336, -0.2534925937652588, -0.08212829381227493, 0.07661914825439453, -0.310653418302536, -0.034726958721876144, 0.05102148652076721, -0.030946962535381317, 0.46270453929901123, 0.3870963752269745, 0.4437519907951355, -0.47608959674835205, 0.0626483261...
https://pimcore.com/docs/platform//Pimcore/Extending_Pimcore/Add_Your_Own_Dependencies_and_Packages#third-party-bundles
Third party bundles You can install third party bundles via composer as shown above (as Pimcore is a standard Symfony application, you should be able to use any third-party Symfony bundle). To load a bundle with the application, it must first be enabled in config/bundles.php (see bundles documentation). As Pimcore defi...
Third party bundles
[ -0.4078858494758606, -0.08906448632478714, -0.08135835081338882, 0.06243911385536194, -0.054555606096982956, -0.29214295744895935, 0.1325995922088623, -0.0999496802687645, -0.21784189343452454, 0.2881247401237488, -0.19853894412517548, 0.4779449701309204, -0.08850566297769547, 0.1839879006...
https://pimcore.com/docs/platform//Pimcore/Extending_Pimcore/Add_Your_Own_Dependencies_and_Packages#pimcore-bundles
Pimcore Bundles For more information see Pimcore Bundles. Just like third party bundles, Pimcore bundles can be registered on the kernel by enabling them in the config/bundles.php or manually by adding them via code as shown above. You can use pimcore:bundle:* commands to list or interact with the bundle installer (ins...
Pimcore Bundles
[ -0.3549620509147644, -0.407516211271286, -0.1524810492992401, 0.09020870923995972, -0.03504910692572594, -0.04626373201608658, 0.15201859176158905, -0.09132233262062073, -0.28268224000930786, 0.3419641852378845, -0.057555124163627625, 0.5281741619110107, -0.22780472040176392, 0.18086673319...
https://pimcore.com/docs/platform//Pimcore/Extending_Pimcore/Overriding_Models#overriding-models--entities-in-pimcore
Overriding Models / Entities in Pimcore Sometimes it is necessary to override certain functionalities of Pimcore's core models, therefore it is possible to override the core models with your own classes. Currently this works for all implementations of the following classes (but not for these classes directly): Pimcor...
Overriding Models / Entities in Pimcore
[ -0.20601406693458557, 0.01731337048113346, -0.1347501575946808, 0.07720315456390381, 0.2016284167766571, -0.11379942297935486, 0.0636649951338768, 0.07383867353200912, 0.047460924834012985, 0.13589663803577423, -0.34453731775283813, 0.3530859351158142, -0.00003405673851375468, 0.0798559933...
https://pimcore.com/docs/platform//Pimcore/Extending_Pimcore/Overriding_Models#configure-an-override
Configure an Override The configuration is a simple key / value map in your config/config.yaml using the key pimcore.models.class_overrides, for example: pimcore: models: class_overrides: 'Pimcore\Model\DataObject\News': 'App\Model\DataObject\News' 'Pimcore\Model\DataObject\News\List...
Configure an Override
[ -0.13722221553325653, -0.05306241288781166, -0.07544661313295364, -0.0924496054649353, 0.22240224480628967, -0.23049268126487732, 0.13029053807258606, 0.03967202454805374, -0.2810741662979126, 0.20284725725650787, -0.2620885670185089, 0.43178653717041016, 0.2672358453273773, 0.159654796123...
https://pimcore.com/docs/platform//Pimcore/Extending_Pimcore/Overriding_Models#example
Example In your config/config.yaml: pimcore: models: class_overrides: 'Pimcore\Model\DataObject\News': 'App\Model\DataObject\News' Your App\Model\DataObject\News: <?php namespace App\Model\DataObject; class News extends \Pimcore\Model\DataObject\News { // start overriding stuff ...
Example
[ -0.2215048223733902, -0.03602296859025955, -0.09743195027112961, 0.11211413890123367, 0.41658368706703186, -0.2333867847919464, 0.18943312764167786, 0.16395677626132965, -0.25251102447509766, 0.2991768419742584, -0.20409105718135834, 0.4468022584915161, 0.13051001727581024, 0.0210415162146...
https://pimcore.com/docs/platform//Pimcore/Extending_Pimcore/Parent_Class_for_Objects#parent-class-for-objects
Parent Class for Objects In addition to overriding model classes it is also possible to make the object model classes extend a certain parent class. To do so, define a Parent class in the classes' basic configuration as in the screen below. The class will then extend the given parent class. Please make sure, that your...
Parent Class for Objects
[ -0.2410861700773239, -0.03262058272957802, -0.1110922172665596, 0.07406926155090332, 0.2656145989894867, -0.0765962228178978, 0.20296256244182587, 0.08636967092752457, -0.06709769368171692, 0.30858463048934937, -0.22802245616912842, 0.3541812300682068, -0.05553671717643738, 0.1728707253932...
https://pimcore.com/docs/platform//Pimcore/Extending_Pimcore/Event_API_and_Event_Manager#events-and-event-listeners
Events and Event Listeners
Events and Event Listeners
[ -0.2923720180988312, -0.4886212944984436, -0.25650981068611145, 0.3866772949695587, -0.08087639510631561, -0.38111722469329834, 0.16758878529071808, -0.16936801373958588, 0.104853555560112, 0.45728185772895813, -0.12174513936042786, 0.17841920256614685, -0.389316588640213, 0.00816451478749...
https://pimcore.com/docs/platform//Pimcore/Extending_Pimcore/Event_API_and_Event_Manager#general
General Pimcore provides an extensive number of events that are fired during execution of Pimcore functions. These events can be used to hook into many Pimcore functions such as saving an object, asset or document and can be used to change or extend the default behavior of Pimcore. The most common use-case for events i...
General
[ -0.21002353727817535, -0.18536844849586487, -0.12064550817012787, 0.014751886948943138, -0.12019289284944534, -0.1950559765100479, 0.0006429685745388269, -0.08777817338705063, -0.3127923309803009, 0.23529404401779175, -0.09984990954399109, 0.33191388845443726, 0.0255246851593256, -0.004273...
https://pimcore.com/docs/platform//Pimcore/Extending_Pimcore/Event_API_and_Event_Manager#available-events
Available Events All Pimcore events are defined and documented as a constant on component specific classes: Assets Documents Data Objects Versions Data Object Class Definition Data Object Classification Store Data Object Custom Layouts Data Object Import Data Object Quantity Value Unit Users / Roles...
Available Events
[ -0.2618822753429413, -0.15367475152015686, -0.16668474674224854, 0.0766405463218689, 0.21599739789962769, -0.25842389464378357, 0.07829690724611282, -0.06678557395935059, -0.15902207791805267, 0.09804562479257584, -0.08880184590816498, 0.2703745365142822, 0.20547927916049957, 0.35467290878...
https://pimcore.com/docs/platform//Pimcore/Extending_Pimcore/Event_API_and_Event_Manager#examples
Examples
Examples
[ 0.1105974018573761, -0.41019901633262634, -0.28510186076164246, 0.1324809491634369, -0.13995729386806488, -0.14305032789707184, 0.3125857710838318, 0.14037898182868958, -0.0417528860270977, 0.3020334243774414, 0.41210994124412537, 0.22653697431087494, -0.10223178565502167, -0.0599273890256...
https://pimcore.com/docs/platform//Pimcore/Extending_Pimcore/Event_API_and_Event_Manager#hook-into-the-pre-update-event-of-assets,-documents-and-objects
Hook into the pre-update event of assets, documents and objects The following example shows how to register events for assets, documents and objects in your config/services.yaml: services: App\EventListener\TestListener: tags: - { name: kernel.event_listener, event: pimcore.asset.preUpdate, meth...
Hook into the pre-update event of assets, documents and objects
[ -0.5542639493942261, 0.03957267478108406, -0.09480693191289902, -0.10705599188804626, 0.0283094123005867, -0.212940976023674, 0.07313606888055801, 0.18734000623226166, -0.2858846187591553, 0.22297585010528564, 0.08709666877985, 0.4183896780014038, -0.16413000226020813, 0.07073421031236649,...
https://pimcore.com/docs/platform//Pimcore/Extending_Pimcore/Event_API_and_Event_Manager#hook-into-the-list-of-objects-in-the-tree,-the-grid-list-and-the-search-panel
Hook into the list of objects in the tree, the grid list and the search panel There are some global events having effect on several places. One of those is pimcore.admin.object.list.beforeListLoad. The object list can be modified (changing condition for instance) before being loaded. This global event will apply to the...
Hook into the list of objects in the tree, the grid list and the search panel
[ 0.16725768148899078, 0.11704307049512863, -0.17239665985107422, 0.055097442120313644, -0.019848046824336052, -0.42129072546958923, 0.09117557853460312, 0.014021321199834347, 0.13044601678848267, 0.2053668200969696, -0.45310428738594055, 0.2841203510761261, -0.024122178554534912, 0.00462767...
https://pimcore.com/docs/platform//Pimcore/Extending_Pimcore/Event_API_and_Event_Manager#hook-into-the-open-document|asset|data-object-dialog
Hook into the Open Document|Asset|Data Object dialog By the default, Pimcore tries to a resolve an element by its ID or path. You can change this behavior by handling the AdminEvents::RESOLVE_ELEMENT event and implement your own logic. \Pimcore::getEventDispatcher()->addListener(AdminEvents::RESOLVE_ELEMENT, fun...
Hook into the Open Document|Asset|Data Object dialog
[ -0.3261253535747528, 0.01828472875058651, -0.1402013748884201, 0.16933472454547882, 0.20585152506828308, -0.4281049370765686, 0.25450989603996277, 0.28356918692588806, 0.21250268816947937, 0.3720501959323883, -0.2556476294994354, 0.3856109082698822, -0.054282285273075104, 0.101004898548126...
https://pimcore.com/docs/platform//Pimcore/Extending_Pimcore/Event_API_and_Event_Manager#asset-upload-path
Asset Upload Path Certain data types (like image, relations, etc ...) allow you to specify a dedicated upload path which defaults to '/_default_upload_bucket' if not otherwise specified in the config yml file or in the class definition. The AssetEvents::RESOLVE_UPLOAD_TARGET event allows you to dynamically modify the t...
Asset Upload Path
[ -0.2261420339345932, 0.11338432133197784, 0.025994427502155304, 0.09170960634946823, 0.04528690129518509, -0.3712039887905121, 0.1783716082572937, 0.09022356569766998, -0.318343847990036, 0.20129431784152985, -0.14105337858200073, 0.6550518870353699, -0.07935960590839386, 0.017457431182265...
https://pimcore.com/docs/platform//Pimcore/Extending_Pimcore/Bundle_Developers_Guide/Loading_Service_Definitions#loading-service-definitions-from-within-a-bundle
Loading Service Definitions From Within a Bundle If you want to load services from your bundle instead of having to define them in config/services.yaml you need to create a dependency injection extension which is able to load your service definitions. You can find detailed documentation on this topic here: Extensions D...
Loading Service Definitions From Within a Bundle
[ -0.053903307765722275, -0.10583079606294632, 0.05092932656407356, 0.05994663015007973, 0.23266719281673431, -0.17139828205108643, 0.39431434869766235, -0.0552346408367157, 0.09343480318784714, 0.12988121807575226, -0.0037823226302862167, 0.08946496993303299, 0.068288154900074, -0.139847293...
https://pimcore.com/docs/platform//Pimcore/Extending_Pimcore/Bundle_Developers_Guide/Auto_Loading_Config_And_Routing_Definitions#auto-loading-config-and-routing-definitions
Auto Loading Config and Routing Definitions By default, Symfony does not load configuration and/or routing definitions from bundles but expects you to define everything in config/ (optionally importing config files from bundles or other locations). Pimcore extends the config loading by trying to automatically load conf...
Auto Loading Config and Routing Definitions
[ -0.2587876319885254, -0.2536291182041168, 0.056308481842279434, 0.2227228432893753, 0.037443388253450394, -0.3833707571029663, 0.016621867194771767, -0.09255829453468323, -0.3877091705799103, 0.045003145933151245, -0.22192078828811646, 0.35502126812934875, 0.08345531672239304, 0.0971898660...
https://pimcore.com/docs/platform//Pimcore/Extending_Pimcore/Bundle_Developers_Guide/Bundle_Collection#bundle-collection
Bundle Collection The BundleCollection is a container which is used to register every used bundle. As Pimcore gathers bundles from multiple sources - registered via code in App\Kernel and registered through config/bundles.php config, it makes sense to have a unified API how bundles can be registered. While Symfony's st...
Bundle Collection
[ -0.16234439611434937, -0.12739761173725128, 0.01706170290708542, 0.20972789824008942, -0.0536351278424263, -0.12187179177999496, 0.24840837717056274, -0.17798426747322083, -0.16131813824176788, 0.1223597452044487, -0.07452242076396942, 0.38582944869995117, 0.1432114839553833, -0.2301044315...
https://pimcore.com/docs/platform//Pimcore/Extending_Pimcore/Bundle_Developers_Guide/Bundle_Collection#bundle-dependencies
Bundle Dependencies If a bundle depends on other bundles, e.g. because it uses features provided by a third-party bundle you need to make sure that third-party bundle is loaded together with your bundle. You can either instruct your users to manually load the bundles your bundle depends on in their App\Kernel or you ca...
Bundle Dependencies
[ -0.2642001807689667, -0.1060841754078865, -0.10121564567089081, 0.13102376461029053, 0.08371295034885406, -0.289556622505188, 0.4143918752670288, 0.08241944760084152, 0.028049038723111153, 0.2081105262041092, 0.06577140837907791, 0.24082739651203156, 0.0022500785999000072, -0.1554184705018...
https://pimcore.com/docs/platform//Pimcore/Extending_Pimcore/Bundle_Developers_Guide/Bundle_Collection#overriding-collection-items
Overriding collection items In case bundle defines a dependency which has the wrong priority or environment restrictions for your project you can override the dependency definition by adding the item to the collection before it is loaded as dependency. The dependency is simply ignored and your item will be used. Let's ...
Overriding collection items
[ -0.14990045130252838, 0.05452374368906021, -0.09719090908765793, 0.18897807598114014, 0.06461489200592041, -0.2167501151561737, 0.18015356361865997, -0.06386260688304901, -0.16706304252147675, 0.311510294675827, 0.21735098958015442, 0.630576491355896, -0.10354671627283096, -0.0282382462173...
https://pimcore.com/docs/platform//Pimcore/Extending_Pimcore/Bundle_Developers_Guide/Pimcore_Bundles/Installers#installers
Installers Besides being enabled, bundles may need to execute installation tasks in order to be fully functional. This may concern tasks like creating database tables creating or updating class definitions importing translations updating database tables or definitions after an update to a newer version ... To give bu...
Installers
[ -0.3148053288459778, -0.14046065509319305, -0.058579880744218826, 0.21551121771335602, 0.009820626117289066, -0.21575334668159485, 0.2254478484392166, -0.24734340608119965, -0.1520642340183258, 0.24759948253631592, 0.10352061688899994, 0.44251853227615356, -0.20381027460098267, 0.004440507...
https://pimcore.com/docs/platform//Pimcore/Extending_Pimcore/Bundle_Developers_Guide/Pimcore_Bundles/Installers#migrations
Migrations A common tasks in evolving bundles is to update an already existing/installed data structure to a newer version while also supporting fresh installs of your bundle. To be able to apply versioned changes (migrations), Pimcore integrates the Doctrine Migrations Bundle which provides a powerful migration frame...
Migrations
[ -0.317388117313385, 0.053835079073905945, -0.13392968475818634, -0.06304813176393509, -0.16314011812210083, -0.011574432253837585, -0.2950013279914856, -0.07597024738788605, -0.44110092520713806, 0.10060255229473114, -0.13861577212810516, 0.3172963559627533, 0.12365438789129257, 0.29013118...
https://pimcore.com/docs/platform//Pimcore/Extending_Pimcore/Bundle_Developers_Guide/Pimcore_Bundles/Installers#pimcore-specifics
Pimcore Specifics Pimcore added an additional option (--prefix=) to the migration commands of Doctrine, to be able to filter the migration versions for a specific namespace. This gives you the possibility to control which migrations should be executed or not. A typical use case for that would be to just run the Pimcore...
Pimcore Specifics
[ -0.2497861236333847, 0.15842269361019135, -0.12286127358675003, -0.006294485181570053, -0.16633503139019012, -0.3779033422470093, -0.0015844114823266864, 0.1406000256538391, -0.5378638505935669, 0.07499437034130096, -0.17697550356388092, 0.2864384353160858, -0.04213225841522217, 0.11537549...
https://pimcore.com/docs/platform//Pimcore/Extending_Pimcore/Bundle_Developers_Guide/Pimcore_Bundles/Installers#console-examples
Console Examples # only run migrations for the Pimcore core ./bin/console doctrine:migrations:migrate --prefix=Pimcore\\Bundle\\CoreBundle # list migrations for the CMF bundle ./bin/console doctrine:migrations:list --prefix=CustomerManagementFrameworkBundle\\Migrations # run all migrations ./bin/console doctrine:migr...
Console Examples
[ -0.2796502113342285, -0.07063383609056473, -0.1811487376689911, -0.060571908950805664, 0.03653399273753166, 0.09877366572618484, 0.0576922707259655, 0.12486433982849121, -0.54300856590271, 0.1215360015630722, -0.1441987305879593, 0.39117515087127686, 0.16965150833129883, 0.0337825715541839...
https://pimcore.com/docs/platform//Pimcore/Extending_Pimcore/Bundle_Developers_Guide/Pimcore_Bundles/Installers#config-examples-(config.yaml)
Config Examples (config.yaml) doctrine_migrations: migrations_paths: 'Pimcore\Bundle\DataHubBundle\Migrations': '@PimcoreDataHubBundle/Migrations' 'CustomerManagementFrameworkBundle\Migrations': '@PimcoreCustomerManagementFrameworkBundle/Migrations'
Config Examples (config.yaml)
[ -0.1757732331752777, 0.19985467195510864, -0.09083402156829834, -0.0862303376197815, 0.10802172124385834, 0.0033895561937242746, 0.23902051150798798, 0.041872769594192505, -0.6097847819328308, 0.008118854835629463, 0.01014465931802988, 0.21360313892364502, 0.1773565262556076, 0.15778324007...
https://pimcore.com/docs/platform//Pimcore/Extending_Pimcore/Bundle_Developers_Guide/Pimcore_Bundles/Installers#settingsstore-installer
SettingsStore Installer The SettingsStoreAwareInstaller adds the following functionality to the default AbstractInstaller: Manage installation state with Settings Store (instead of checking executed migrations). Optionally mark certain migrations as migrated during install. Reset migration state of migrations (if ther...
SettingsStore Installer
[ -0.5050367712974548, -0.22160202264785767, -0.06721317023038864, -0.06043924763798714, -0.07131675630807877, -0.024965863674879074, -0.08870745450258255, -0.07747327536344528, -0.005958690773695707, 0.023491626605391502, 0.04313066229224205, 0.16122475266456604, -0.19277538359165192, 0.142...
https://pimcore.com/docs/platform//Pimcore/Extending_Pimcore/Bundle_Developers_Guide/Pimcore_Bundles/Installers#implementation
Implementation For using the SettingsStore Installer extend from the SettingsStoreAwareInstaller and implement standard install and uninstall methods. At the end of these methods either call the corresponding parent method or call $this->markInstalled() / $this->markUninstalled() to make sure SettingsStore is upd...
Implementation
[ -0.5927113890647888, -0.1298598349094391, 0.01665382646024227, 0.09329462051391602, 0.08622407168149948, -0.1631319373846054, 0.056656308472156525, -0.12134814262390137, -0.340072363615036, 0.10006632655858994, 0.04868999123573303, 0.4731597900390625, -0.13584309816360474, -0.0900474712252...
https://pimcore.com/docs/platform//Pimcore/Extending_Pimcore/Bundle_Developers_Guide/Pimcore_Bundles/Installers#installation
Installation During installation of the bundle following things will happen: All statements of the install method are executed. If implemented correctly, the bundle is marked as installed in the SettingsStore. If configured, all defined migrations are marked as migrated (without actually executing them).
Installation
[ -0.05059221386909485, -0.30659207701683044, -0.03547484427690506, 0.023247448727488518, -0.034168489277362823, 0.054453086107969284, 0.1008615717291832, -0.4388640820980072, -0.15944774448871613, -0.04708681255578995, 0.055549684911966324, 0.29787370562553406, -0.051253728568553925, -0.006...
https://pimcore.com/docs/platform//Pimcore/Extending_Pimcore/Bundle_Developers_Guide/Pimcore_Bundles/Installers#uninstallation
Uninstallation During uninstallation of the bundle following things will happen: All statements of the uninstall method are executed. If implemented correctly, the bundle is marked as uninstalled in the SettingsStore. Execution state of all bundle migrations that were already migrated will be reset (without actually e...
Uninstallation
[ 0.06362328678369522, -0.30068540573120117, -0.012283802963793278, 0.0052868700586259365, 0.03344659507274628, 0.06698909401893616, 0.15453927218914032, -0.47643420100212097, -0.23860424757003784, -0.09190960973501205, -0.12531810998916626, 0.39819952845573425, -0.20669136941432953, -0.0406...
https://pimcore.com/docs/platform//Pimcore/Extending_Pimcore/Bundle_Developers_Guide/Pimcore_Bundles/Installers#migrations
Migrations Working with migrations is the same as described in the Migration section above. For further details please see Migrations Doctrine Migrations Doctrine Migrations Bundle
Migrations
[ -0.10341261327266693, 0.034329481422901154, -0.26796820759773254, -0.22464998066425323, 0.12359137833118439, -0.17130383849143982, 0.17410290241241455, -0.10656396299600601, -0.29018959403038025, -0.004342155996710062, -0.2205638885498047, 0.08116111159324646, 0.03436923772096634, 0.009562...
https://pimcore.com/docs/platform//Pimcore/Extending_Pimcore/Bundle_Developers_Guide/Pimcore_Bundles#pimcore-bundles
Pimcore Bundles Pimcore bundles follow the same rules as normal bundles, but need to implement Pimcore\Extension\Bundle\PimcoreBundleInterface in order to show up in the pimcore:bundle:list command. This gives you the following possibilities: The bundle shows up in the pimcore:bundle:list command with info, if bundle ...
Pimcore Bundles
[ -0.16377763450145721, -0.14027705788612366, -0.12402980029582977, 0.23160482943058014, 0.0883416011929512, -0.09192468971014023, 0.1297379583120346, 0.11502974480390549, -0.10029060393571854, -0.027192898094654083, -0.242673859000206, 0.5557388663291931, 0.019986212253570557, 0.23435443639...
https://pimcore.com/docs/platform//Pimcore/Extending_Pimcore/Bundle_Developers_Guide/Pimcore_Bundles#installer
Installer By default, a Pimcore bundle does not define any installation or update routines, but you can use the getInstaller() method to return an instance of a Pimcore\Extension\Bundle\Installer\InstallerInterface. If a bundle returns an installer instance, this installer will be used by the command pimcore:bundle:ins...
Installer
[ -0.23267123103141785, -0.0050488607957959175, -0.08486299961805344, 0.11156408488750458, -0.06170430779457092, -0.12325448542833328, -0.17176029086112976, -0.23719000816345215, -0.2215787023305893, 0.12296991795301437, -0.08073119819164276, 0.51864093542099, -0.0966431275010109, 0.13515545...
https://pimcore.com/docs/platform//Pimcore/Extending_Pimcore/Bundle_Developers_Guide/Pimcore_Bundles#composer-bundles
Composer bundles If you provide your bundle via composer, it won't be automatically found. To include your package directory to the list of scanned paths, please set the package type of your package to pimcore-bundle. Additionally, if you set the specific bundle name through the pimcore.bundles composer extra config no...
Composer bundles
[ -0.39172041416168213, -0.05379126965999603, -0.025870850309729576, 0.2752358317375183, 0.17018911242485046, -0.27930572628974915, 0.0470622256398201, 0.00588241359218955, -0.2412211000919342, 0.24146480858325958, -0.019922060891985893, 0.5716348886489868, -0.2024936079978943, 0.12216690927...
https://pimcore.com/docs/platform//Pimcore/Extending_Pimcore/Bundle_Developers_Guide/Pimcore_Bundles#returning-the-composer-package-version
Returning the composer package version Pimcore provides a Pimcore\Extension\Bundle\Traits\PackageVersionTrait which you can include in your bundle. The trait includes a getComposerPackageName method which will return the name defined in your composer.json file. If you want to change the default behavior, all you need t...
Returning the composer package version
[ -0.46295276284217834, -0.020184701308608055, -0.1565505862236023, 0.16876642405986786, -0.15430884063243866, -0.45989227294921875, -0.16649559140205383, 0.24139709770679474, -0.3121150732040405, 0.4957335889339447, 0.0014017523499205709, 0.7410804629325867, 0.04223788157105446, 0.045521769...
https://pimcore.com/docs/platform//Pimcore/Extending_Pimcore/Bundle_Developers_Guide/Event_Listener_UI#event-listener-ui
Event Listener UI
Event Listener UI
[ -0.2783080041408539, -0.4684312641620636, -0.1613626331090927, 0.2653205096721649, -0.006805018056184053, -0.4064840078353882, 0.33034032583236694, -0.008864330127835274, 0.1710810512304306, 0.3888791501522064, -0.033887747675180435, 0.3558044731616974, -0.33060458302497864, 0.219962269067...
https://pimcore.com/docs/platform//Pimcore/Extending_Pimcore/Bundle_Developers_Guide/Event_Listener_UI#general
General The Pimcore Backend UI is based upon the Ext JS Framework. An event listener can add Ext components to the user interface or execute any other JavaScript required in the listener context. All JavaScript and CSS which should be included, needs to be defined in your bundle class, as described in Pimcore Bundles. ...
General
[ -0.23841822147369385, -0.20856517553329468, -0.15342293679714203, 0.07352928817272186, 0.21554771065711975, -0.26496440172195435, -0.05899614095687866, 0.04091031476855278, -0.18776607513427734, 0.08116022497415543, -0.041610099375247955, 0.5057892203330994, 0.1049429178237915, 0.321427434...
https://pimcore.com/docs/platform//Pimcore/Extending_Pimcore/Bundle_Developers_Guide/Event_Listener_UI#javascript-ui-events
JavaScript UI Events For registering events just add a listener with some of the events from events.js.
JavaScript UI Events
[ -0.2272997498512268, -0.12940463423728943, -0.17554065585136414, -0.2050429731607437, 0.04217102751135826, -0.22572004795074463, 0.3912159204483032, 0.027996154502034187, 0.1603631228208542, 0.162092387676239, 0.06903695315122604, 0.195433109998703, -0.13899260759353638, 0.1962824612855911...
https://pimcore.com/docs/platform//Pimcore/Extending_Pimcore/Bundle_Developers_Guide/Event_Listener_UI#validate-pimcore-object's-data-in-frontend-before-saving
Validate Pimcore Object's Data in frontend before saving It is possible to validate Pimcore Object's Data in frontend and cancel the saving if needed. This can be done by using preventDefault() and stopPropagation(): Code example in startup.js: document.addEventListener(pimcore.events.preSaveObject, (e) => { let...
Validate Pimcore Object's Data in frontend before saving
[ -0.2857123911380768, 0.012850138358771801, -0.10126796364784241, 0.07766570895910263, 0.20860625803470612, -0.39417532086372375, 0.023333953693509102, -0.031873252242803574, -0.49458378553390503, 0.35013705492019653, 0.0982554703950882, 0.2710243761539459, 0.06382011622190475, 0.2616371512...
https://pimcore.com/docs/platform//Pimcore/Extending_Pimcore/Bundle_Developers_Guide/Event_Listener_UI#i18n-texts-for-js
I18n texts for js Pimcore supports i18n for UI extensions. First see the i18n section for bundles how to prepare the data server-side. Once this is done, translations can be accessed anywhere in the javascript code by calling t('translation_key')
I18n texts for js
[ -0.0014725768705829978, -0.17026647925376892, -0.20198018848896027, 0.17078670859336853, 0.13466744124889374, -0.3152730464935303, 0.12294446676969528, -0.12912146747112274, -0.24908675253391266, 0.27414199709892273, -0.31124866008758545, 0.2901904582977295, 0.4117565155029297, 0.267675757...
https://pimcore.com/docs/platform//Pimcore/Extending_Pimcore/Bundle_Developers_Guide/Event_Listener_UI#adding-custom-main-navigation-items
Adding Custom Main Navigation Items It is possible to add leftside main navigation via event listener and the preMenuBuild event. See the following example to know how: pimcore.plugin.mybundle = Class.create({ initialize: function () { document.addEventListener(pimcore.events.preMenuBuild, this.preMenuBuild...
Adding Custom Main Navigation Items
[ -0.15116992592811584, -0.3732799291610718, -0.11524061858654022, -0.06909596920013428, -0.155626580119133, 0.14040380716323853, 0.0650729387998581, -0.09351968765258789, -0.33843231201171875, -0.06900884956121445, -0.4536076486110687, 0.2936945855617523, 0.1464766263961792, 0.1150759905576...
https://pimcore.com/docs/platform//Pimcore/Extending_Pimcore/Bundle_Developers_Guide/Event_Listener_UI#adding-custom-submenus-to-existingnavigation-items
Adding Custom Submenus To ExistingNavigation Items It is possible to add submenus to existing menus just by pushing a new menu item into the submenu. pimcore.registerNS("pimcore.bundle.glossary.startup"); pimcore.bundle.glossary.startup = Class.create({ initialize: function () { document.addEvent...
Adding Custom Submenus To ExistingNavigation Items
[ -0.025067510083317757, -0.16234639286994934, -0.09853819012641907, 0.007128765806555748, -0.1753520518541336, 0.024181220680475235, 0.014292627573013306, -0.11136985570192337, -0.3481125235557556, 0.01009232085198164, -0.3817189931869507, 0.181942880153656, 0.21725088357925415, 0.052946589...
https://pimcore.com/docs/platform//Pimcore/Extending_Pimcore/Bundle_Developers_Guide/Event_Listener_UI#adding-custom-key-bindings
Adding Custom Key Bindings It is possible to add custom key bindings via event listener the preRegisterKeyBindings event and a config setting. Most key bindings are used to have shortcuts for menus. pimcore_admin: user: default_key_bindings: glossary: key: 'G' act...
Adding Custom Key Bindings
[ -0.061153117567300797, -0.25818392634391785, -0.055748116225004196, -0.20310497283935547, -0.0028565165121108294, -0.14052438735961914, -0.033457815647125244, -0.023407110944390297, -0.21997611224651337, 0.12865319848060608, -0.2973191738128662, 0.5309582352638245, -0.05579398199915886, 0....
https://pimcore.com/docs/platform//Pimcore/Extending_Pimcore/Bundle_Developers_Guide/Adding_Asset_Types#adding-asset-types
Adding Asset Types This feature allows users to add their own custom asset types. To register new custom asset types, you must follow these steps:
Adding Asset Types
[ -0.025079557672142982, -0.2457728385925293, -0.22148458659648895, -0.04266887903213501, 0.013384752906858921, 0.1429772824048996, 0.4390728771686554, 0.04792450740933418, -0.03788255155086517, 0.17762282490730286, -0.18731248378753662, 0.06462883204221725, 0.014674980193376541, 0.248399421...
https://pimcore.com/docs/platform//Pimcore/Extending_Pimcore/Bundle_Developers_Guide/Adding_Asset_Types#1)-create-the-php-asset-class
1) Create the PHP asset class The asset must extend Pimcore\Model\Asset. Let´s create a class for InDesign (the namespace does not matter) but it's best practice to put your assets into a Model\Asset sub-namespace): For examples have a look at the Pimcore core asset types at github. <?php // src/Model/Asset/InDesign...
1) Create the PHP asset class
[ -0.3321826159954071, 0.10474317520856857, -0.15211930871009827, 0.2337675392627716, 0.2341562956571579, 0.00556974858045578, 0.37211161851882935, 0.3705614507198334, -0.08814476430416107, 0.06963575631380081, 0.047600217163562775, 0.328062504529953, -0.009691215120255947, 0.015979502350091...
https://pimcore.com/docs/platform//Pimcore/Extending_Pimcore/Bundle_Developers_Guide/Adding_Asset_Types#2)-create-javascript-class-for-the-asset-view-editor:
2) Create JavaScript class for the asset view editor: It needs to extend pimcore.asset.asset, be located in the namespace pimcore.asset and named after the $type property of the corresponding PHP class. For examples have a look at the Pimcore core asset types at github
2) Create JavaScript class for the asset view editor:
[ -0.21490508317947388, 0.1511303335428238, -0.15474660694599152, -0.011758213862776756, 0.08207379281520844, -0.17640262842178345, 0.31326279044151306, 0.40136829018592834, -0.11149007081985474, 0.1948244571685791, -0.06539423018693924, 0.6657353639602661, -0.08888307958841324, 0.3340119123...
https://pimcore.com/docs/platform//Pimcore/Extending_Pimcore/Bundle_Developers_Guide/Adding_Asset_Types#3)-register-the-asset-on-the-asset-type-map
3) Register the asset on the asset type map Next we need to update the pimcore.assets.type_definitions.map configuration to include our asset. This can be done in any config file which is loaded (e.g. /config/config.yaml). The matching has to be an array of regular expressions of your data type. # /config/config.yaml ...
3) Register the asset on the asset type map
[ -0.36294734477996826, 0.02814354933798313, -0.0710245743393898, -0.005884305573999882, 0.2514875829219818, 0.05409950390458107, 0.34239673614501953, 0.18045680224895477, -0.06555725634098053, -0.06797219067811966, -0.10354891419410706, 0.470318078994751, 0.04811351001262665, 0.241642206907...
https://pimcore.com/docs/platform//Pimcore/Extending_Pimcore/Bundle_Developers_Guide/Adding_Document_Types#adding-document-types
Adding Document Types Defining custom documents can be done in the config via a static mapping from document type to class name. Prior to 10.6, the only way to define custom documents was to create them in a special namespace Pimcore\Model\Document. This is still possible, but the document can be in any namespace as lo...
Adding Document Types
[ -0.2112227976322174, -0.008313236758112907, 0.006212819833308458, -0.03516925498843193, -0.1053343266248703, -0.08690657466650009, 0.13242477178573608, 0.051020022481679916, -0.30121344327926636, 0.07259352505207062, -0.2918750047683716, 0.556032657623291, 0.009058290161192417, -0.05777396...
https://pimcore.com/docs/platform//Pimcore/Extending_Pimcore/Bundle_Developers_Guide/Adding_Document_Types#1)-create-the-document-class
1) Create the document class The document must extend Pimcore\Model\Document. Lets create a Book document (the namespace does not matter but it's best practice to put your documents into a Model\Document sub-namespace): <?php // src/Model/Document/Book.php namespace App\Model\Document; class Book extends \Pimcore\...
1) Create the document class
[ -0.22990380227565765, -0.01674024388194084, -0.07977792620658875, 0.12563158571720123, 0.11872733384370804, -0.17894865572452545, 0.19245103001594543, 0.3170410096645355, -0.13704121112823486, 0.1565968543291092, -0.028548257425427437, 0.42196419835090637, -0.03583909571170807, 0.109160348...
https://pimcore.com/docs/platform//Pimcore/Extending_Pimcore/Bundle_Developers_Guide/Adding_Document_Types#2)-register-the-document-on-the-document-type-map
2) Register the document on the document type map Next we need to update pimcore.documents.type_definitions.map configuration to include our document. This can be done in any config file which is loaded (e.g. /config/config.yaml), but if you provide the editable with a bundle you should define it in a configuration fil...
2) Register the document on the document type map
[ -0.2926805317401886, -0.016443846747279167, -0.03897952660918236, -0.21694371104240417, 0.04028749465942383, 0.02030245028436184, 0.16190195083618164, 0.07025935500860214, -0.36622703075408936, 0.03755474463105202, -0.20460808277130127, 0.79560387134552, 0.0023188369814306498, 0.2966034710...
https://pimcore.com/docs/platform//Pimcore/Extending_Pimcore/Bundle_Developers_Guide/Adding_Document_Types#do-not-use-to-override-a-class
Do not use to override a class The type_definitions should only be used to add new documents. If you want to override an existing class please use the pimcore:models:class_overrides instead. For a more detailed explanation see Overriding Models.
Do not use to override a class
[ -0.2704530358314514, -0.165531188249588, -0.06567062437534332, -0.065325528383255, 0.29730328917503357, -0.23494000732898712, 0.15400424599647522, 0.17534343898296356, -0.20701748132705688, 0.22887682914733887, -0.060695670545101166, 0.4458148181438446, 0.07162964344024658, 0.2440284341573...
https://pimcore.com/docs/platform//Pimcore/Extending_Pimcore/Bundle_Developers_Guide/Adding_Document_Editables#adding-document-editables
Adding Document Editables With bundles, it is also possible to add an individual Document Editable. Previously, the only way to define editables was to create them in a special namespace Pimcore\Model\Document\Editable. This is still possible, but now editables can be in any namespace as long as the editable is correct...
Adding Document Editables
[ -0.11016803979873657, -0.008151527494192123, -0.06632471084594727, -0.03207829222083092, 0.12037596106529236, 0.12021763622760773, 0.18597137928009033, 0.07019659876823425, -0.5272759795188904, 0.2984708547592163, -0.5251874923706055, 0.798039436340332, -0.08950329571962357, -0.02157202176...
https://pimcore.com/docs/platform//Pimcore/Extending_Pimcore/Bundle_Developers_Guide/Adding_Document_Editables#1)-create-the-editable-class
1) Create the editable class The editable must extend Pimcore\Model\Document\Editable. Lets create a Markdown editable (the namespace does not matter but it's best practice to put your editables into a Model\Document\Editable sub-namespace): <?php // src/Model/Document/Editable/Markdown.php namespace App\Model\Docu...
1) Create the editable class
[ -0.19859634339809418, 0.017684392631053925, -0.13684295117855072, -0.09095203131437302, 0.155482217669487, -0.027379093691706657, 0.1631660759449005, 0.14043933153152466, -0.2732497453689575, 0.200858935713768, -0.20188942551612854, 0.7323760390281677, -0.16220732033252716, 0.0584715567529...
https://pimcore.com/docs/platform//Pimcore/Extending_Pimcore/Bundle_Developers_Guide/Adding_Document_Editables#2)-register-the-editable-on-the-editable-map
2) Register the editable on the editable map Next we need to update pimcore.documents.editables.map configuration to include our editable. This can be done in any config file which is loaded (e.g. /config/config.yaml), but if you provide the editable with a bundle you should define it in a configuration file which is a...
2) Register the editable on the editable map
[ -0.22630462050437927, 0.02716687135398388, -0.10866332799196243, -0.22885799407958984, 0.06097693368792534, 0.08895725756883621, 0.09835582226514816, 0.017669538035988808, -0.3802512288093567, 0.12697747349739075, -0.2784581482410431, 0.9438549280166626, -0.0040692491456866264, 0.157375544...
https://pimcore.com/docs/platform//Pimcore/Extending_Pimcore/Bundle_Developers_Guide/Adding_Document_Editables#3)-create-frontend-js
3) Create frontend JS For the frontend, a JavaScript class needs to be added pimcore.document.editables.markdown. It can extend any of the existing pimcore.document.editables.* class and must return it's type by overwriting the function getType(). If you extend from other bundles editables make sure your bundle is load...
3) Create frontend JS
[ -0.2672847509384155, -0.21368670463562012, -0.11939192563295364, -0.09424902498722076, 0.1923726350069046, -0.12047754228115082, 0.27572423219680786, 0.26081353425979614, -0.3568459451198578, 0.03725624829530716, -0.2663682699203491, 0.8793414235115051, 0.012854358181357384, 0.260733246803...
https://pimcore.com/docs/platform//Pimcore/Extending_Pimcore/Bundle_Developers_Guide/Adding_Object_Datatypes#adding-object-datatypes
Adding Object Datatypes With plugins, it is also possible to add individual data types for Pimcore Objects. Following steps are necessary to do so: Create a PHP class for server-side implementation: This class needs to extend Pimcore\Model\DataObject\ClassDefinition\Data and defines how your data type is stored into ...
Adding Object Datatypes
[ -0.25196728110313416, -0.054117485880851746, -0.07446625083684921, 0.3659825026988983, 0.14625434577465057, -0.22479256987571716, 0.043065816164016724, 0.007091997656971216, -0.23671023547649384, 0.1393258273601532, -0.18822413682937622, 0.59998619556427, -0.05482761189341545, 0.4461802840...
https://pimcore.com/docs/platform//Pimcore/Extending_Pimcore/Bundle_Developers_Guide/Adding_Object_ Layout_types#adding-object-layout-types
Adding Object Layout Types Note: This feature is available since v6.6.1 With plugins, it is also possible to add individual layout types for Pimcore Objects. Following steps are necessary to do so: Create a PHP class for server-side implementation: This class needs to extend Pimcore\Model\DataObject\ClassDefinition...
Adding Object Layout Types
[ -0.17307893931865692, -0.30743661522865295, -0.13330510258674622, 0.14727844297885895, 0.07742992043495178, -0.30421480536460876, 0.16081036627292633, 0.0883532389998436, -0.3512672483921051, 0.15133967995643616, -0.21392594277858734, 0.5019590258598328, 0.12360383570194244, 0.460623651742...
https://pimcore.com/docs/platform//Pimcore/Extending_Pimcore/Bundle_Developers_Guide/Loading_Admin_UI_Assets#loading-assets-in-the-admin-ui
Loading Assets in the Admin UI If you need to load assets (JS, CSS) in the Admin or Editmode UI, you have 2 options, depending on if you do that from a Pimcore Bundle or from somewhere else.
Loading Assets in the Admin UI
[ -0.14759232103824615, -0.15836599469184875, -0.22170975804328918, 0.1175631657242775, 0.16514381766319275, -0.052718427032232285, 0.16480596363544464, 0.05575385317206383, 0.08727627247571945, 0.08899611234664917, -0.2312798649072647, 0.2482205629348755, 0.42893314361572266, 0.000608995556...
https://pimcore.com/docs/platform//Pimcore/Extending_Pimcore/Bundle_Developers_Guide/Loading_Admin_UI_Assets#pimcore-bundles
Pimcore Bundles Just add the PimcoreBundleAdminClassicInterface to your bundle class. The interface prescribes the following methods: getJsPaths getCssPaths getEditmodeJsPaths getEditmodeCssPaths In order to implement all four methods prescribed by the interface you can use the BundleAdminClassicTrait.
Pimcore Bundles
[ -0.32545727491378784, -0.3058854341506958, -0.07486795634031296, 0.14021098613739014, 0.05935049057006836, -0.13971368968486786, 0.2693963646888733, 0.029497884213924408, -0.23437204957008362, 0.18380659818649292, -0.10459376871585846, 0.6478803157806396, -0.07854430377483368, 0.1334474235...
https://pimcore.com/docs/platform//Pimcore/Extending_Pimcore/Bundle_Developers_Guide/Loading_Admin_UI_Assets#encore
Encore As Pimcore uses Encore to build its assets, it also provides an EncoreHelper-Class to include built files in your bundle. You can use EncoreHelper::getBuildPathsFromEntryPoints to get all paths from the assets and load them with the methods mentioned above. This command accepts the path to entrypoints.json file...
Encore
[ -0.4641605615615845, -0.006977858487516642, -0.12425892055034637, 0.40282005071640015, 0.04673471674323082, -0.029505444690585136, -0.04932226240634918, 0.2560305893421173, -0.3728639483451843, -0.18803837895393372, -0.25557491183280945, 0.5881285667419434, 0.02920548804104328, 0.232542619...
https://pimcore.com/docs/platform//Pimcore/Extending_Pimcore/Bundle_Developers_Guide/Loading_Admin_UI_Assets#event-based
Event Based You can add additional paths to load by handling the events defined on BundleManagerEvents. For example, to load the JS file when loading the admin UI, implement an event listener like the following (please see Events for details on how to implement and register event listeners): <?php namespace App\Eve...
Event Based
[ -0.1293066293001175, 0.09299290180206299, -0.05616040155291557, 0.262710839509964, 0.24313189089298248, -0.40920451283454895, 0.319170743227005, 0.06293363124132156, 0.2712686359882355, 0.10283124446868896, -0.1011524647474289, 0.37684139609336853, 0.12402328848838806, 0.026637112721800804...
https://pimcore.com/docs/platform//Pimcore/Extending_Pimcore/Bundle_Developers_Guide#bundle-developer's-guide
Bundle Developer's Guide Since Pimcore utilizes the powerful Symfony Bundle system, let us refer to the Symfony Bundle Documentation on how to get started with your custom bundles. A bundle can do anything - in fact, core Pimcore functionalities like the admin interface are implemented as bundles. From within your bund...
Bundle Developer's Guide
[ -0.23154351115226746, -0.26581019163131714, -0.09118140488862991, 0.25782978534698486, -0.05294173210859299, -0.13560058176517487, 0.12393948435783386, -0.18486431241035461, -0.14069800078868866, 0.14598210155963898, -0.18292078375816345, 0.39284926652908325, -0.04662207141518593, 0.241679...
https://pimcore.com/docs/platform//Pimcore/Extending_Pimcore/Bundle_Developers_Guide#bundle-directory-structure
Bundle Directory Structure See Bundle Directory Structure for a standard bundle directory layout.
Bundle Directory Structure
[ 0.058500129729509354, -0.37964361906051636, -0.2824123501777649, 0.3296017348766327, 0.20270632207393646, 0.18988022208213806, 0.354659765958786, -0.06901856511831284, -0.10967203229665756, 0.2046046257019043, -0.23904100060462952, 0.030280224978923798, 0.049912236630916595, 0.044488154351...
https://pimcore.com/docs/platform//Pimcore/Extending_Pimcore/Bundle_Developers_Guide#pimcore-bundles
Pimcore Bundles There is a special kind of bundle implementing Pimcore\Extension\Bundle\PimcoreBundleInterface which gives you additional possibilities. These bundles provide a similar API as plugins did in previous versions: The bundle shows up in the pimcore:bundle:list command with info if the bundle can be install...
Pimcore Bundles
[ -0.3879658877849579, -0.11445015668869019, -0.1606181114912033, 0.1109381765127182, -0.019975481554865837, -0.06685176491737366, 0.06136460602283478, 0.17891457676887512, -0.05088943615555763, 0.1821727603673935, -0.1464046835899353, 0.5107122659683228, -0.12295719236135483, 0.395320564508...
https://pimcore.com/docs/platform//Pimcore/Extending_Pimcore/Bundle_Developers_Guide#generating-pimcore-bundles
Generating Pimcore Bundles With the Pimcore Bundle Generator, we provide a tool for generating bundle skeletons. You can install and activate this bundle in your development instance and simplify starting the Pimcore bundle development. # generate bundle interactively $ bin/console pimcore:generate:bundle # generate b...
Generating Pimcore Bundles
[ -0.47500693798065186, -0.25130918622016907, -0.15235762298107147, 0.13921210169792175, -0.03358893841505051, -0.08454908430576324, 0.22691412270069122, 0.09897877275943756, -0.20996475219726562, 0.4252321124076843, -0.03977784886956215, 0.48900026082992554, -0.16588707268238068, 0.33176368...
https://pimcore.com/docs/platform//Pimcore/Extending_Pimcore/Bundle_Developers_Guide#common-tasks
Common Tasks Below is a list of common tasks and how to achieve them inside your bundles.
Common Tasks
[ -0.08703634887933731, -0.4403056502342224, -0.19611527025699615, -0.14852170646190643, 0.09309318661689758, 0.06651417165994644, 0.1434895247220993, -0.10824605822563171, 0.07747019827365875, 0.2557668685913086, -0.09456197172403336, 0.36479872465133667, 0.2631389796733856, 0.2486838400363...
https://pimcore.com/docs/platform//Pimcore/Extending_Pimcore/Bundle_Developers_Guide#service-configuration
Service Configuration If you want to provide custom services from within your bundle, you must create an Extension to load your service definitions. This topic is covered in detail in the Extensions Documentation. You can find an example of how to create an extension for your bundles in Loading Service Definitions.
Service Configuration
[ -0.10024246573448181, -0.3935156762599945, -0.09601788967847824, -0.09038690477609634, 0.042684223502874374, -0.11164858192205429, 0.3079659044742584, -0.33162611722946167, 0.04234937205910683, 0.262263685464859, -0.04369419068098068, 0.264334499835968, 0.11205540597438812, 0.1265656948089...
https://pimcore.com/docs/platform//Pimcore/Extending_Pimcore/Bundle_Developers_Guide#auto-loading-config-and-routing-definitions
Auto-Loading Config and Routing Definitions Bundles can provide config and routing definitions in Resources/config/pimcore which will be automatically loaded with the bundle. See Auto loading config and routing definitions for more information.
Auto-Loading Config and Routing Definitions
[ -0.49929097294807434, -0.3451676368713379, -0.07730261236429214, 0.016574950888752937, 0.10541650652885437, -0.23793749511241913, 0.002056187717244029, -0.40693211555480957, -0.350246787071228, 0.22146065533161163, 0.045477379113435745, 0.45188939571380615, 0.048621971160173416, 0.31940239...
https://pimcore.com/docs/platform//Pimcore/Extending_Pimcore/Bundle_Developers_Guide#i18n--translations
i18n / Translations See the Symfony Translation Component Documentation for locations that will be automatically searched for translation files. For bundles, translations should be stored in the Resources/translations/ directory of the bundle in the format locale.loader (or domain.locale.loader if you want to handle a ...
i18n / Translations
[ 0.1791144758462906, -0.06493805348873138, -0.12087920308113098, 0.28156527876853943, 0.11152365058660507, 0.040588948875665665, 0.186066135764122, -0.05940492823719978, 0.06888918578624725, 0.20476332306861877, -0.23235680162906647, -0.21278692781925201, 0.15409794449806213, -0.30834817886...
https://pimcore.com/docs/platform//Pimcore/Extending_Pimcore/Bundle_Developers_Guide#translations-domain
Translations Domain A translation domain is only considered valid when it is registered as follows: pimcore: translations: domains: - site_1 - site_2 Then only translations stored in a dedicated domain table e.g. translations_DOMAIN are used by the Pimcore translation service.
Translations Domain
[ 0.03469852730631828, -0.06498521566390991, -0.08148805797100067, 0.2621835172176361, 0.03108326904475689, -0.17282038927078247, 0.30293500423431396, -0.20725864171981812, -0.25529295206069946, -0.07375048100948334, -0.4522627294063568, -0.14541152119636536, 0.42328664660453796, -0.19366736...
https://pimcore.com/docs/platform//Pimcore/Extending_Pimcore/Bundle_Developers_Guide#security--authentication
Security / Authentication You can fully use the Symfony Security Component by auto-loading the security configuration as documented above. The best practice is to define the security configuration in a dedicated security.yaml, which can be imported from your bundle's config.yaml. For further details on security please ...
Security / Authentication
[ -0.07742045074701309, 0.06636457145214081, -0.09191401302814484, -0.025710780173540115, -0.014664307236671448, -0.07722059637308121, 0.43439024686813354, -0.16938723623752594, 0.012812952511012554, 0.25452497601509094, 0.1098005473613739, 0.023011064156889915, 0.24907201528549194, 0.000146...
https://pimcore.com/docs/platform//Pimcore/Extending_Pimcore/Bundle_Developers_Guide#events
Events To hook into core functions, you can attach to any event provided by the Pimcore event manager. Custom listeners can be registered from your bundle by defining an event listener service. Further reading: Symfony Event Dispatcher for documentation on how to create event listeners and how to register them as a s...
Events
[ -0.40838539600372314, -0.30335256457328796, -0.15043140947818756, -0.0739559754729271, -0.15774282813072205, -0.23092873394489288, -0.03883872181177139, -0.039943113923072815, -0.03815336152911186, 0.3102271854877472, -0.2369706928730011, 0.447098046541214, 0.028642378747463226, 0.16137145...
https://pimcore.com/docs/platform//Pimcore/Extending_Pimcore/Bundle_Developers_Guide#local-storage-for-your-bundle
Local Storage for Your Bundle Sometimes a bundle needs to save files (e.g. generated files or cached data, ...). If the data is temporary and should be removed when the Symfony cache is cleared, please use a directory inside the cache directory. The core cache directory can be fetched from the Kernel and is registered ...
Local Storage for Your Bundle
[ -0.08775649964809418, -0.12399102747440338, -0.09546297043561935, 0.3282930850982666, 0.07137785851955414, 0.1023363545536995, 0.22346745431423187, 0.038736771792173386, -0.05360962823033333, 0.31613707542419434, -0.16773971915245056, 0.23889340460300446, 0.12092580646276474, -0.2592288553...
https://pimcore.com/docs/platform//Pimcore/Extending_Pimcore/Bundle_Developers_Guide#extending-the-admin-ui
Extending the Admin UI The following section explains how to design and structure bundles and how to register for and utilize the events provided in the PHP backend and the Ext JS frontend: Event_Listener_UI
Extending the Admin UI
[ -0.06083007901906967, -0.24293503165245056, -0.1690327525138855, 0.3164256811141968, 0.09678904712200165, -0.0847541093826294, 0.1268877238035202, 0.050893522799015045, 0.1851370930671692, 0.33492597937583923, 0.1870446801185608, 0.17931774258613586, -0.003424551337957382, 0.20534211397171...
https://pimcore.com/docs/platform//Pimcore/Extending_Pimcore/Bundle_Developers_Guide#adding-document-editables
Adding Document Editables See Adding Document Editables
Adding Document Editables
[ -0.052529919892549515, -0.16222374141216278, -0.30395078659057617, -0.2169555425643921, 0.08649758994579315, 0.22169388830661774, 0.1579410284757614, 0.11757499724626541, -0.20102208852767944, 0.30121782422065735, -0.2462412714958191, 0.4550556540489197, -0.07080045342445374, -0.0044664097...
https://pimcore.com/docs/platform//Pimcore/Extending_Pimcore/Dependency_Injection_Tags#dependency-injection-tags
Dependency Injection Tags Please read the intro of dependency injection tags of Symfony first. In addition to the tags provided by Symfony, Pimcore adds it's own tags to flag special purpose services. Following an overview of all additional service tags provided by Pimcore: Name Usage pimcore.area.brick Used to ...
Dependency Injection Tags
[ 0.09188679605722427, -0.23967888951301575, -0.0828976258635521, 0.165769562125206, -0.07709607481956482, -0.17299218475818634, 0.3525463044643402, -0.2304503321647644, 0.4773431122303009, 0.12117181718349457, -0.22483813762664795, 0.6005487442016602, 0.1583394706249237, 0.11824879050254822...
https://pimcore.com/docs/platform//Pimcore/Extending_Pimcore/Maintenance_Mode#maintenance-mode
Maintenance Mode Pimcore offers a maintenance mode, which restricts access to the admin user interface to the user that enabled the maintenance mode. It is session based and no other user will be able to access the website or the admin interface. All other users get a default "Temporary not available" page di...
Maintenance Mode
[ -0.10025955736637115, -0.31072741746902466, -0.12759903073310852, -0.11758443713188171, 0.10894366353750229, -0.16563372313976288, 0.20044848322868347, -0.09277194738388062, -0.2037423998117447, 0.3004668653011322, -0.179353728890419, 0.15545564889907837, 0.07125701755285263, -0.1168390512...