$value) { $this->config[$key] = $value; } } /** * Placeholder for async widget. * You can customize it by overwriting this method. * * @return string */ public function placeholder() { return ''; } /** * Async and reloadable widgets are wrapped in container. * You can customize it by overriding this method. * * @return array */ public function container() { return [ 'element' => 'div', 'attributes' => 'style="display:inline" class="arrilot-widget-container"', ]; } /** * Cache key that is used if caching is enabled. * * @param $params * * @return string */ public function cacheKey(array $params = []) { return 'arrilot.widgets.'.serialize($params); } /** * Cache tags to help flush all cache with the same tag(s). * * @return array */ public function cacheTags() { return array_unique(array_merge(['widgets'], $this->cacheTags)); } /** * Add defaults to configuration array. * * @param array $defaults */ protected function addConfigDefaults(array $defaults) { $this->config = array_merge($this->config, $defaults); } }