Show or Hide the tour.

@param   int         $tourid     The ID of the tour to display.
@param   int         $visibility The intended visibility.
331046
protected function show_hide_tour($tourid, $visibility) {
        global $DB;

        require_sesskey();

        $tour = $DB->get_record('tool_usertours_tours', array('id' => $tourid));
        $tour->enabled = $visibility;
        $DB->update_record('tool_usertours_tours', $tour);

        redirect(helper::get_list_tour_link());
    }
446278
public function show($id)
    {
        try
        {
            $throttle = $this->users->getUserThrottle($id);
            $user = $throttle->getUser();
            $permissions = $user->getMergedPermissions();

            return View::make(Config::get('cpanel::views.users_show'))
                ->with('user',$user)
                ->with('groups',$user->getGroups())
                ->with('permissions',$permissions)
                ->with('throttle',$throttle);
        }
        catch ( UserNotFoundException $e)
        {
            return Redirect::route('cpanel.users.index')
                ->with('error', $e->getMessage());
        }
    }
1152304
public function setVisibility($path, $visibility)
    {
        $this->filesystem->setVisibility(
            $this->path($path),
            $visibility
        );
    }
922787
public static function show($config, $id = null, $simple = false, $registro = null) {
        //$config = CrudGenerator::translateConfig($config);
        $modelo = strtolower(class_basename($config["modelo"]));
        if ($registro == null) {
            $modeloM = ucfirst($config['modelo']);
            if ($id == null) {
                $registro = $modeloM::first();
            } elseif (is_object($id)) {
                $registro = $id;
                $id = $registro->getKey();
            } else {
                $registro = $modeloM::find($id);
            }
        }
        if (!CrudGenerator::checkPermission($config, $registro->getKey())) {
            return View::make('sirgrimorum::crudgen.error', ['message' => trans('crudgenerator::admin.messages.permission')]);
        }
        if (!$simple) {
            $js_section = config("sirgrimorum.crudgenerator.js_section");
            $css_section = config("sirgrimorum.crudgenerator.css_section");
        } else {
            $js_section = "";
            $css_section = "";
        }
        $view = View::make('sirgrimorum::crudgen.show', array(
                    'config' => $config,
                    'registro' => $registro,
                    'js_section' => $js_section,
                    'css_section' => $css_section,
                    'modelo' => $modelo
        ));
        return $view->render();
    }
402519
public function setVisibility(string $visibility) {
		if ($visibility !== self::VISIBILITY_PRIVATE
				&& $visibility !== self::VISIBILITY_PROTECTED
				&& $visibility !== self::VISIBILITY_PUBLIC) {
			throw new \InvalidArgumentException(sprintf('The visibility "%s" does not exist.', $visibility));
		}

		$this->visibility = $visibility;

		return $this;
	}
622884
public function view(string $id = null)
    {
        $role = $this->Roles->get($id, [
            'contain' => ['Groups']
        ]);

        $roleCaps = $this->Roles->Capabilities->find('list')->where(['role_id' => $id])->toArray();

        $capabilities = $this->formatCapabilities(Utils::getAllCapabilities());

        $this->set('capabilities', $capabilities);
        $this->set('roleCaps', $roleCaps);
        $this->set('role', $role);
        $this->set('_serialize', ['role']);
    }
353111
public function setInvisible(int $id): void
    {
        $sourceNodeData = $this->locationGateway->getBasicNodeData($id);

        $this->locationGateway->setNodeWithChildrenInvisible($sourceNodeData['path_string']);
    }
207951
public function set_tourid($value) {
        $this->tourid = $value;
        $this->tour = null;
        $this->dirty = true;

        return $this;
    }
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());
    }
1028226
public function show($id)
    {
        /** @noinspection PhpUndefinedMethodInspection */
        $team = Team::with('user')
            ->findOrFail($id);
        $this->authorize('view', $team);
        return fractal($team, new TeamTransformer())
            ->withResourceName('team')
            ->respond();
    }
80187
public function show($id, Request $request)
    {
        /** @var Article $article */
        $article = Article::query()->findOrFail($id);
        $article->visited();

        $template = $request->get('tmpl', 'master');

        event(new ArticleWasViewed($article));

        return view($article->getTemplate(), compact('article', 'template'));
    }
606225
public function show($id)
    {
        $user = UserRepository::find($id);
        $this->checkUser($user);

        if ($user->activated_at) {
            $activated = html_ago($user->activated_at);
        } else {
            if (Credentials::hasAccess('admin') && Config::get('credentials.activation')) {
                $activated = 'No - <a href="#resend_user" data-toggle="modal" data-target="#resend_user">Resend Email</a>';
            } else {
                $activated = 'Not Activated';
            }
        }

        if (Credentials::getThrottleProvider()->findByUserId($id)->isSuspended()) {
            $suspended = 'Currently Suspended';
        } else {
            $suspended = 'Not Suspended';
        }

        $groups = $user->getGroups();
        if (count($groups) >= 1) {
            $data = [];
            foreach ($groups as $group) {
                $data[] = $group->name;
            }
            $groups = implode(', ', $data);
        } else {
            $groups = 'No Group Memberships';
        }

        return View::make('credentials::users.show', compact('user', 'groups', 'activated', 'suspended'));
    }
895424
public function view(string $id = null)
    {
        $translation = $this->Translations->get($id, [
            'contain' => ['Languages']
        ]);

        $this->set('translation', $translation);
        $this->set('_serialize', ['translation']);
    }
495763
public function getVisibilityIdByValue($visibility)
    {

        // query whether or not, the requested visibility is available
        if (isset($this->availableVisibilities[$visibility])) {
            // load the visibility ID, add the mapping and return the ID
            return $this->availableVisibilities[$visibility];
        }

        // throw an exception, if not
        throw new \Exception(
            $this->appendExceptionSuffix(
                sprintf('Found invalid visibility %s', $visibility)
            )
        );
    }
773126
public function show($id)
    {
        $event = $this->repository->find($id);

        if (empty($event)) {
            abort(404);
        }

        return view('cms-frontend::events.'.$event->template)->with('event', $event);
    }
660705
public function show($id)
    {
        $model = Logs::withoutGlobalScopes()->with('component', 'priority', 'brand')->with(['user' => function($query) {
                        $query->whereRaw('tbl_users.id in (' . implode(',', $this->users()) . ') or tbl_users.id is null');
                    }])->whereId($id)->firstOrFail();
        return $this->presenter->show($model);
    }
926567
public function toggleVisibility($intId, $blnVisible)
    {
        // Check permissions to publish
        if (!$this->User->isAdmin && !$this->User->hasAccess('tl_banner::banner_published', 'alexf'))
        {
            $this->log('Not enough permissions to publish/unpublish Banner ID "'.$intId.'"', 'tl_banner toggleVisibility', TL_ERROR);
            $this->redirect('contao/main.php?act=error');
        }
    
        // Update database
        \Database::getInstance()->prepare("UPDATE tl_banner SET banner_published='" . ($blnVisible ? 1 : '') . "' WHERE id=?")
                                ->execute($intId);
    }