Sets a location + all children to visible.

@param int $id Location ID
545537
public function setVisible(int $id): void
    {
        $this->logger->logCall(__METHOD__, ['location' => $id]);
        $this->persistenceHandler->locationHandler()->setVisible($id);

        $this->cache->invalidateTags(['location-path-data-' . $id]);
    }
698917
public function setId( $id )
	{
		if( $id === $this->getId() ) { return; }

		$this->_values['id'] = (string) $id ;
		$this->setModified();
	}
969636
public function view($id = null)
    {
        $cmsTerm = $this->CmsTerm->get($id, [
            'contain' => ['CmsPermission']
        ]);
        $this->set('cmsTerm', $cmsTerm);
        $this->set('_serialize', ['cmsTerm']);
    }
166710
public function setId($id)
    {
        if ($this->id) {
            return;
        }
        if (strlen($id) >= 20) {
            $this->id = $id;

            return;
        }
        list($a, $b) = explode(' ', microtime());
        $this->id = preg_replace("/[^\d]/", '', $b.$a.$id);
    }
160577
public function offsetUnset($id)
    {
        unset($this->values[$id]);
        unset($this->definitions[$id]);
        unset($this->aliases[$id]);
    }
626699
private function setFile(string $id)
    {
        if (!$this->id || $id != $this->id) {
            $this->id = $id;
            $id = Check::name($id, ["#"]);
            $this->file = (preg_match("/^" . preg_quote(PATH_HOME, '/') . "/i", $id) ? $id : PATH_HOME . "_cdn/" . parent::getFolder() . "/{$id}");

            // Verifica se é final .json
            if (!preg_match("/\.json$/i", $id))
                $this->file .= ".json";
        }
    }
1363061
public function view($id = null) {
        $task = $this->Tasks->get($id, [
            'contain' => ['Roles']
        ]);
        $this->set('task', $task);
        $this->set('_serialize', ['task']);
    }
746669
public function view($id = null) {
        $cmsContent = $this->CmsContent->get($id, [
            'contain' => ['CmsPermission', 'CmsTermRelation']
        ]);
        $this->set('cmsContent', $cmsContent);
        $this->set('_serialize', ['cmsContent']);
    }
816036
private void setMarkerVisibleInMap(final String id) {
        if (null != id) {
            final WeakReference<MapCoordinateElement> weakReference = mapCoordinateElements.get(id);
            if (null != weakReference) {
                final MapCoordinateElement mapCoordinateElement = weakReference.get();
                if (null != mapCoordinateElement) {
                    if (mapCoordinateElement.getVisible()) {
                        jsMapView.call("showMapObject", mapCoordinateElement.getId());
                    } else {
                        jsMapView.call("hideMapObject", mapCoordinateElement.getId());
                    }
                }
            }
        }
    }
1234038
public function edit(string $id = null): void
    {
        $menuItem = $this->MenuItems->get($id, [
            'contain' => ['Menus']
        ]);
        if ($this->request->is(['patch', 'post', 'put'])) {
            $data = (array)$this->request->getData();
            $menuItem = $this->MenuItems->patchEntity($menuItem, $data);
            if ($this->MenuItems->save($menuItem)) {
                $this->Flash->success((string)__('The menu item has been saved.'));
                $this->redirect(['controller' => 'Menus', 'action' => 'view', $menuItem->get('menu')->get('id')]);

                return;
            } else {
                $this->Flash->error((string)__('The menu item could not be saved. Please, try again.'));
            }
        }

        $parentMenuItems = $this->MenuItems
            ->find('treeList', ['spacer' => self::TREE_SPACER])
            ->where(['MenuItems.menu_id' => $menuItem->get('menu')->get('id'), 'MenuItems.id !=' => $id]);

        $this->set(compact('menuItem', 'parentMenuItems'));
        $this->set('_serialize', ['menuItem']);
    }
229595
public function removeChild($id)
	{
		$key = array_search($this, $this->_parent->_children);
		unset($this->_parent->_children[$key]);
	}
510442
protected function move_tour($id) {
        require_sesskey();

        $direction = required_param('direction', PARAM_INT);

        $tour = tour::instance($id);
        self::_move_tour($tour, $direction);

        redirect(helper::get_list_tour_link());
    }
103195
public function remove($id)
    {
        $this->client->delete(Inflector::pluralize($this->getResourceName()).'/'.$id);
    }
1113562
public function view(string $id = null): void
    {
        $menu = $this->Menus->get($id, [
            'contain' => [
                'MenuItems' => function ($q) {
                    return $q->order(['MenuItems.lft' => 'ASC']);
                }
            ]
        ]);

        if ($menu->get('menu_items')) {
            $tree = TableRegistry::getTableLocator()->get('Menu.MenuItems')
                ->find('treeList', ['spacer' => self::TREE_SPACER])
                ->where(['MenuItems.menu_id' => $menu->id])
                ->toArray();
            // create node property in the entity object
            foreach ($menu->get('menu_items') as $menuItem) {
                if (!array_key_exists($menuItem->id, $tree)) {
                    continue;
                }
                $menuItem->node = $tree[$menuItem->id];
            }
        }

        $this->set('navMenu', $menu);
        $this->set('_serialize', ['navMenu']);
    }
1283825
public function actionEdit(int $id): void
	{
		$this->page = $this->orm->pages->getById($id);
		if (!$this->page) {
			$this->error();
		}

		$gallery = $this['gallery'];
		$gallery->setStorage($this->orm->pagesGalleries);
		$gallery->setForeignKey('page', $this->page->id);
		$gallery->setNamespace('page/' . $this->page->url);
	}
838028
public function display($id)
    {
        if (!$this->locking) {
            readfile($this->path . '/' . $id);

            return;
        }

        $fp = fopen($this->path . '/' . $id, 'rb');
        flock($fp, LOCK_SH);
        fpassthru($fp);
        flock($fp, LOCK_UN);
        fclose($fp);
    }
819246
protected function setIds($id)
    {
        if ($id) {
            $this->props = $this->mergeProps(array(
                $this->props,
                array(
                    'attribsContainer' => array(
                        'id' => $id.'_container',
                    ),
                    'attribs' => array(
                        'id' => $id,
                    ),
                    'attribsLabel' => array(
                        'for' => $id,
                    ),
                    'attribsHelpBlock' => array(
                        'id' => $id.'_help_block',
                    ),
                ),
            ));
        }
    }