# How can i get plugin configuration in backend detail/list view

**URL:** <https://forum.shopware.com/t/how-can-i-get-plugin-configuration-in-backend-detail-list-view/53947>\
**Category:** Programmierung\
**Created:** [7. Juli 2018 um 10:23 UTC](https://forum.shopware.com/t/how-can-i-get-plugin-configuration-in-backend-detail-list-view/53947 "2018-07-07T10:23:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sonali123](https://avatars.discourse-cdn.com/v4/letter/s/dfb087/32.png) [@sonali123](https://forum.shopware.com/u/sonali123)\
**Post date:** [7. Juli 2018 um 10:23 UTC](https://forum.shopware.com/t/how-can-i-get-plugin-configuration-in-backend-detail-list-view/53947/1 "2018-07-07T10:23:09Z")

</div>

Hello,

I’ve edited my&nbsp; **ProductList/ProductList.php** file&nbsp;

```
 'onPostDispatchBackendIndex',
		];
	}

	/**
	 * {@inheritdoc}
	 */
	public function install(InstallContext $installContext) {
		$this->createDatabase();
	}

	/**
	 * {@inheritdoc}
	 */
	public function activate(ActivateContext $activateContext) {
		$activateContext->scheduleClearCache(InstallContext::CACHE_LIST_ALL);
	}

	/**
	 * {@inheritdoc}
	 */
	public function uninstall(UninstallContext $uninstallContext) {
		if (!$uninstallContext->keepUserData()) {
			$this->removeDatabase();
		}
	}

	private function createDatabase() {
		$modelManager = $this->container->get('models');
		$tool = new SchemaTool($modelManager);

		$classes = $this->getClasses($modelManager);

		$tool->updateSchema($classes, true); // make sure to use the save mode
	}

	private function removeDatabase() {
		$modelManager = $this->container->get('models');
		$tool = new SchemaTool($modelManager);

		$classes = $classes = $this->getClasses($modelManager);

		$tool->dropSchema($classes);
	}

	/**
	 * @param ModelManager $modelManager
	 * @return array
	 */
	private function getClasses(ModelManager $modelManager) {
		return [
			$modelManager->getClassMetadata(Product::class),
		];
	}

	/**
	 * @param \Enlight_Controller_ActionEventArgs $args
	 */
	public function onPostDispatchBackendIndex(\Enlight_Controller_ActionEventArgs $args) {
		$request = $args->getRequest();
		$view = $args->getSubject()->View();

		$config = $this->container->get('shopware.plugin.cached_config_reader')->getByPluginName($this->getName());

		$view->assign('ProductImportApi', $config['ProductImportApi']);
		$view->assign('ProductImportUsername', $config['ProductImportUsername']);
		$view->assign('ProductImportCategoryId', $config['ProductImportCategoryId']);

		$view->addTemplateDir($this->getPath() . '/Resources/views');

		
	}

}

```

Now how can I use this variable in detail or list view? Please find attached snap for hierarchy

[Imgur: The magic of the Internet](https://imgur.com/hVcEcCL)&nbsp;
