public function builder() { var_dump("Corrigiendo bug eliminar"); $Pattern = $this->patternBuilder->addFilter(array('_id' => $this->nid, 'estado' => 'despublicado'))->build(); $this->nota = $Pattern->load(); foreach ($this->nota as $key => $value) { Cache::request()->save(Cache::get_conf()->cache_prefix->nota . $this->nid . '.' . $key, null, Cache::get_conf()->cache_time->nota); Cachejson::request()->save(Cachejson::get_conf()->cache_prefix->nota . $this->nid . '.' . $key, null, Cachejson::get_conf()->cache_time->nota); } Cache::request()->save(Cache::get_conf()->cache_prefix->nota . $this->nid . '.node', null, Cache::get_conf()->cache_time->nota); Cachejson::request()->save(Cachejson::get_conf()->cache_prefix->nota . $this->nid . '.node', null, Cachejson::get_conf()->cache_time->nota); \Rpp\Services\Get\Content::$content = null; \Rpp\Services\Get\Flow::$flow = null; $home = new \Rpp\Services\Publish\Dominio\Home(); $home->make(); //---flujo galerias----// if ($this->nota->tipo == 'galeria') { \Rpp\Services\Get\Gallery::home(); } elseif ($this->nota->tipo == 'blog') { \Rpp\Services\Get\Flow::autor(); } elseif ($this->nota->tipo == 'brandcontent') { \Rpp\Services\Get\Flow::brandcontent(); } \Rpp\Services\Get\Instantarticle::flow(); \Rpp\Services\Get\Instantarticle::flowupd(); $seccion = new \Rpp\Services\Publish\Dominio\Seccion(); var_dump($this->nota->categoria_slug); foreach ($this->nota->categoria_slug as $seccion_slug) { $seccion_slug = explode("/", $seccion_slug); unset($seccion_slug[0]); if (count($seccion_slug) > 0) { for ($i = count($seccion_slug); $i > 0; $i--) { //var_dump('del:',implode('/',$seccion_slug)); $seccion->set_slug(implode('/', $seccion_slug)); $seccion->make(); unset($seccion_slug[$i]); } } } $tag = new \Rpp\Services\Publish\Dominio\Tag(); foreach ($this->nota->tags as $tag_slug) { $tag->set_slug($tag_slug['slug']); $tag->make(); } $this->viewCache->delete("portada.bodyopen.home"); $this->viewCache->delete("portada.bodycentral.home"); $this->viewCache->delete("portada.bodyclose.home"); ###remaquetado########## $this->viewCache->delete("portada.body.open.home"); $this->viewCache->delete("portada.body.central.home"); $this->viewCache->delete("portada.body.close.home"); if ($this->nota->tipo == 'galeria') { foreach ($this->nota->galeria as $v => $e) { $this->viewCache->delete("nota.header.geleria." . $this->nid . "." . $v); ###remaquetado########## $this->viewCache->delete("nota.header.galeria." . $this->nid . "." . $v); } } $this->viewCache->delete("nota.wrap.group." . $this->nid); ###remaquetado########## $this->viewCache->delete("nota.article.body." . $this->nid); var_dump("terminate......."); }
public function builder() { $this->nota = \Rpp\Services\Get\Content::nota($this->nid); \Rpp\Services\Get\Content::node($this->nid); \Rpp\Services\Get\Flow::home(); $this->reload_categoria($this->nota->categoria_slug); $this->reload_tag($this->nota->tags); //---flujo galerias----// if ($this->nota->tipo == 'galeria') { \Rpp\Services\Get\Gallery::home(); } elseif ($this->nota->tipo == 'blog') { \Rpp\Services\Get\Flow::autor(); \Rpp\Services\Get\Flow::autor($this->nota->autor['slug']); } elseif ($this->nota->tipo == 'brandcontent') { \Rpp\Services\Get\Flow::brandcontent(); } ##########instant article##################################### if (@$this->nota->instant_article) { \Rpp\Services\Get\Instantarticle::flow(); \Rpp\Services\Get\Instantarticle::flowupd(); } elseif (@$this->last->instant_article) { \Rpp\Services\Get\Instantarticle::flow(); \Rpp\Services\Get\Instantarticle::flowupd(); } ############################################################## if (@$this->last->categoria) { $this->reload_categoria($this->last->categoria); } if (@$this->last->tags) { $this->last->tags = json_decode(json_encode($this->last->tags), true); if ($this->last->tags != $this->nota->tags) { $this->reload_tag($this->last->tags); } } if (@$this->last->tipo) { if ($this->last->tipo == 'galeria') { galeria\Rpp\Services\Get\Gallery::home(); } if ($this->last->tipo == 'blog') { \Rpp\Services\Get\Flow::autor(); } } $this->viewCache->delete("portada.bodyopen.home"); $this->viewCache->delete("portada.bodycentral.home"); $this->viewCache->delete("portada.bodyclose.home"); ###remaquetado########## $this->viewCache->delete("portada.body.open.home"); $this->viewCache->delete("portada.body.central.home"); $this->viewCache->delete("portada.body.close.home"); if ($this->nota->tipo == 'galeria') { foreach ($this->nota->galeria as $v => $e) { $this->viewCache->delete("nota.header.geleria." . $this->nid . "." . $v); ###remaquetado########## $this->viewCache->delete("nota.header.galeria." . $this->nid . "." . $v); } } $this->viewCache->delete("nota.wrap.group." . $this->nid); ###remaquetado########## $this->viewCache->delete("nota.article.body." . $this->nid); var_dump("terminate......."); }