Add a view action.
777375
public function buildItemActions()
    {
        $nodeTranslation = $this->nodeTranslation;
        $create_route = function (EntityInterface $item) use ($nodeTranslation) {
            $arr = array('path' => 'KunstmaanFormBundle_formsubmissions_list_edit', 'params' => array('nodeTranslationId' => $nodeTranslation->getId(), 'submissionId' => $item->getId()));

            return $arr;
        };
        $ia = new \Kunstmaan\AdminListBundle\AdminList\ItemAction\SimpleItemAction($create_route, 'eye', 'View');
        $this->addItemAction($ia);
    }
286235
def register_view(self, view):
        """"""
        super(PreferencesWindowController, self).register_view(view)
        self.view['add_library_button'].connect('clicked', self._on_add_library)
        self.view["remove_library_button"].connect('clicked', self._on_remove_library)

        self.view['config_tree_view'].connect("button_press_event", self._on_row_clicked_trigger_toggle_of_boolean,
                                              self.core_config_model, self.core_list_store)
        self.view['gui_tree_view'].connect("button_press_event", self._on_row_clicked_trigger_toggle_of_boolean,
                                           self.gui_config_model, self.gui_list_store)

        self.view['core_config_value_renderer'].set_property('editable', True)
        self.view['core_config_value_renderer'].connect('edited', self._on_config_value_changed, self.core_config_model,
                                                        self.core_list_store)

        self.view['gui_config_value_renderer'].set_property('editable', True)
        self.view['gui_config_value_renderer'].connect('edited', self._on_config_value_changed, self.gui_config_model,
                                                       self.gui_list_store)

        self.view['shortcut_config_value_renderer'].set_property('editable', True)
        self.view['shortcut_config_value_renderer'].connect('edited', self._on_shortcut_changed)

        self.view['library_config_key_renderer'].set_property('editable', True)
        self.view['library_config_key_renderer'].connect('edited', self._on_library_name_changed)

        self.view['library_config_value_renderer'].set_property('editable', True)
        self.view['library_config_value_renderer'].connect('edited', self._on_library_path_changed)

        self.view['config_tree_view'].set_model(self.core_list_store)
        self.view['library_tree_view'].set_model(self.library_list_store)
        self.view['gui_tree_view'].set_model(self.gui_list_store)
        self.view['shortcut_tree_view'].set_model(self.shortcut_list_store)

        self.view['apply_button'].connect("clicked", self._on_apply_button_clicked)
        self.view['ok_button'].connect('clicked', self._on_ok_button_clicked)
        self.view['cancel_button'].connect('clicked', self._on_cancel_button_clicked)

        self.view['import_button'].connect("clicked", self._on_import_config)
        self.view['export_button'].connect('clicked', self._on_export_config)

        self.view['preferences_window'].connect('delete_event', self._on_delete_event)

        self.update_all()
1350950
public function addView(View $view)
    {
        if ($this->hasView($view->getName())) {
            throw SchemaException::schemaViewAlreadyExists($this->getName(), $view->getName());
        }

        $this->views[$view->getName()] = $view;
    }
482017
public function setView() {
        if (!is_string($this->action) || empty($this->action)) {
            $errMessage = 'The action value must be a string and not be empty';
            throw new \InvalidArgumentException($errMessage, GeneralErrors::VALUE_IS_NOT_OF_EXPECTED_TYPE);
        }
        if (\Puzzlout\Framework\Core\Request::Init($this->app)->IsPost()) {
            //No view needed for Ajax calls.
            return;
        }
        $this->view = \Puzzlout\Framework\Core\ViewLoader::Init($this)->GetView();
        $this->page->setContentFile($this->view);
    }
350752
def add_view(self, request, **kwargs):
        
        if self.model is Page:
            return HttpResponseRedirect(self.get_content_models()[0].add_url)
        return super(PageAdmin, self).add_view(request, **kwargs)
967420
def register_view(self, view):
        """"""
        super(TopToolBarController, self).register_view(view)
        view['maximize_button'].connect('clicked', self.on_maximize_button_clicked)
        self.update_maximize_button()
149460
function addAction(codemirror, slideNumer, action) {
    // parse properties from the new actions to next compare with
    // the current ones in the slide
    var currentActions = O.Template.parseProperties(action);
    var currentLine;
    var c = 0;
    var blockStart;

    // search for a actions block
    for (var i = slideNumer + 1; i < codemirror.lineCount(); ++i) {
      var line = codemirror.getLineHandle(i).text;
      if (ACTIONS_BLOCK_REGEXP.exec(line)) {
        if (++c === 2) {
          // parse current slide properties
          var slideActions = O.Template.parseProperties(getLines(codemirror, blockStart, i));
          var updatedActions = {};

          // search for the same in the slides
          for (var k in currentActions) {
            if (k in slideActions) {
              updatedActions[k] = currentActions[k];
            }
          }

          // remove the ones that need update
          for (var k in updatedActions) {
            for (var linePos = blockStart + 1; linePos < i; ++linePos) {
              if (k in O.Template.parseProperties(codemirror.getLine(linePos))) {
                codemirror.removeLine(linePos);
                i -= 1;
              }
            }
          }

          // insert in the previous line
          currentLine = codemirror.getLineHandle(i);
          codemirror.setLine(i, action + "\n" + currentLine.text);
          return;
        } else {
          blockStart = i;
        }
      } else if(SLIDE_REGEXP.exec(line)) {
        // not found, insert a block
        currentLine = codemirror.getLineHandle(slideNumer);
        codemirror.setLine(slideNumer, currentLine.text + "\n```\n" + action +"\n```\n");
        return;
      }
    }
    // insert at the end
    currentLine = codemirror.getLineHandle(slideNumer);
    codemirror.setLine(slideNumer, currentLine.text + "\n```\n"+ action + "\n```\n");
  }
1201208
def view(self, *args, **kwargs):
        
        def decorator(f):
            kwargs.setdefault("view_class", self.view_class)
            return self.add_view(as_view(*args, **kwargs)(f))
        return decorator
445363
protected function addActions ()
    {
        add_action(Hooks::ADMIN_MENU, array($this, 'addPage'));
        if ($this->currentlyOnPage()) {
            add_action(Hooks::ADMIN_INIT, [$this, 'adminInit']);
        }
    }
1062720
@UiThread
  @SafeVarargs public static <T extends View> void run(@NonNull T view,
      @NonNull Action<? super T>... actions) {
    for (Action<? super T> action : actions) {
      action.apply(view, 0);
    }
  }
814393
def register_view(self, view):
        """"""
        self.measure_to_view_map.register_view(view=view, timestamp=self.time)
1170597
public void addWindow(View view, String name) {
        mWindowsLock.writeLock().lock();
        try {
            mWindows.put(view.getRootView(), name);
        } finally {
            mWindowsLock.writeLock().unlock();
        }
        fireWindowsChangedEvent();
    }
283054
def register_view(self, view):
        """"""
        self.view.set_text(self.model.credits)
        gobject.timeout_add(1500, self.on_begin_scroll)
        return
689161
def addAction( self, action ):
        
        if not isinstance(action, QAction):
            action_name = nativestring(action)
            action = QAction(action_name, self)
            action.setObjectName(action_name)
        
        action.setCheckable(True)
        
        if ( not self._actionGroup ):
            self._actionGroup = QActionGroup(self)
            action.setChecked(True)
            
        self._actionGroup.addAction(action)
        self.reset()
        return action
64858
def __view_add_actions(self):
        

        self.Components_Manager_Ui_treeView.addAction(self.__engine.actions_manager.register_action(
            "Actions|Umbra|Components|factory.ComponentsManagerUi|Activate Component(s)",
            slot=self.__view_activate_components_action__triggered))
        self.Components_Manager_Ui_treeView.addAction(self.__engine.actions_manager.register_action(
            "Actions|Umbra|Components|factory.ComponentsManagerUi|Deactivate Component(s)",
            slot=self.__view_deactivate_components_action__triggered))

        separator_action = QAction(self.Components_Manager_Ui_treeView)
        separator_action.setSeparator(True)
        self.Components_Manager_Ui_treeView.addAction(separator_action)

        self.Components_Manager_Ui_treeView.addAction(self.__engine.actions_manager.register_action(
            "Actions|Umbra|Components|factory.ComponentsManagerUi|Reload Component(s)",
            slot=self.__view_reload_components_action__triggered))

        separator_action = QAction(self.Components_Manager_Ui_treeView)
        separator_action.setSeparator(True)
        self.Components_Manager_Ui_treeView.addAction(separator_action)
305464
def register_view(self, view):
        """"""
        super(StateMachineTreeController, self).register_view(view)
        self.view.connect('button_press_event', self.mouse_click)
        self.view_is_registered = True
        self.update(with_expand=True)
903276
public function viewAction()
    {
        $comments = new \Phpmvc\Comment\CommentsInSession();
        $comments->setDI($this->di);

        $all = $comments->findAll();

        $this->views->add('comment/comments', [
            'comments' => $all,
        ]);
    }