I have coded a plugin in my module which extends block base and generates labels for block in /admin/structure/block page under Place block. These block are being generated for different entities. The creation of block for different entities is dynamic and depend on configuration setting of module.I am facing two problem related to this:Firstly,suppose in the configuration form I have selected comment and user so label for these two entities are created in the Place block section but when I deselect comment then the label for comment remains still remains in block section.And when I clear the cache the label for comment is removed from Place block section.The code which I am using in build()
function is:
public function build() {
return array(
'#theme' => 'links__entity__module',
'#links' => $this->linkBuilder->buildLinks($this->request->attributes->get($entity_type)),
);
}
What changes should I make so that configuration changes are immediately reflected in the /admin/structure/block page?
For the other problem I am facing I asked it over here:All instances of block are not getting removed. Thanks.