Default CRUD action.  Show list of items.
427660
public function defaultAction()
    {
        $em = $this->getEntityManager();
        $pagerParams = ['itemsCountPerPage' => static::ITEMS_ON_PAGE, 'sort' => Application::getRequest()->getSort(),];
        $repository = $em->getRepository($this->entityName);

        $grid = new \Cmf\Component\Grid([
            'fields' => $this->getFieldsConfig(),
            'data' => $repository,
            'pager' => $pagerParams,
            'idField' => 'id',
            'actionLinks' => $this->getActionLinkConfig(),
        ]);

        return ['grid' => $grid];
    }
175304
private I_CmsContextMenuItem findDefaultAction(Collection<I_CmsContextMenuItem> items) {

        I_CmsContextMenuItem result = null;
        int resultRank = -1;
        for (I_CmsContextMenuItem menuItem : items) {
            if ((menuItem instanceof CmsContextMenuActionItem)
                && (((CmsContextMenuActionItem)menuItem).getWorkplaceAction() instanceof I_CmsDefaultAction)) {
                I_CmsDefaultAction action = (I_CmsDefaultAction)((CmsContextMenuActionItem)menuItem).getWorkplaceAction();
                if (getVisibility(menuItem).isActive()) {
                    if (result == null) {
                        result = menuItem;
                        resultRank = action.getDefaultActionRank(m_context);
                    } else {
                        int rank = action.getDefaultActionRank(m_context);
                        if (rank > resultRank) {
                            result = menuItem;
                            resultRank = rank;
                        }
                    }
                }
            }
        }
        return result;
    }
1109168
public function showAction()
    {
        $this->setPageTitle(sprintf($this->_('Show %s'), $this->getTopic()));

        $model    = $this->getModel();
        // NEAR FUTURE:
        // $this->addSnippet('ModelVerticalTableSnippet', 'model', $model, 'class', 'displayer');
        $repeater = $model->loadRepeatable();
        $table    = $this->getShowTable();
        $table->setOnEmpty(sprintf($this->_('Unknown %s.'), $this->getTopic(1)));
        $table->setRepeater($repeater);
        $table->tfrow($this->createMenuLinks($this->menuShowIncludeLevel), array('class' => 'centerAlign'));

        if ($menuItem = $this->findAllowedMenuItem('edit')) {
            $table->tbody()->onclick = array('location.href=\'', $menuItem->toHRefAttribute($this->getRequest()), '\';');
        }

        $tableContainer = \MUtil_Html::create('div', array('class' => 'table-container'), $table);
        $this->html[] = $tableContainer;
    }
229507
protected function actionListFile()
    {
        list($selected, $action) = $this->getPostedAction();

        $disk = $db = 0;

        foreach ($selected as $file_id) {
            if ($action === 'delete' && $this->access('file_delete')) {
                $this->file->deleteAll($file_id, $db, $disk);
            }
        }

        if (!empty($selected)) {
            $severity = $disk && $disk == $db ? 'success' : 'warning';
            $message = $this->text('Deleted from database: %db, disk: %disk', array('%db' => $db, '%disk' => $disk));
            $this->setMessage($message, $severity);
        }
    }
1058442
def _list_items(action, key, profile=None, subdomain=None, api_key=None):
    '''
    
    '''
    items = _query(
        profile=profile,
        subdomain=subdomain,
        api_key=api_key,
        action=action
    )
    ret = {}
    for item in items[action]:
        ret[item[key]] = item
    return ret
549281
final public function actionslistAction() {
		$reflection = new ReflectionObject($this);
		
		echo "Available actions:\033[1;32m";
		
		foreach ($reflection->getMethods(ReflectionMethod::IS_PUBLIC) as $method) {
			$length = strlen($method->name) - 6;
			
			if (strpos($method->name, 'Action') === $length) {
				echo ' ', substr($method->name, 0, $length);
			}
		}
		
		echo "\033[0m";
	}
623874
def item_controller(self):
        """"""
        return StartActionItemController(
            self,
            self.raw,
            self.state,
            self.path,
            self.devices_dict)
1303300
public function indexAction()
    {
        $this->html->h2($this->getTopicTitle());

        $displayColumns = array('link'     => '',
                                'context'  => $this->_('Context'),
                                'maxLevel' => $this->_('Max level'),
                                'level'    => $this->_('Level'));

        foreach($this->_upgrades->getUpgradesInfo() as $row) {
            $menuItem = $this->menu->findAllowedController($this->_getParam('controller'), 'show');
            if ($menuItem) {
                $row['link'] = $menuItem->toActionLinkLower($this->getRequest(), $row);
            }
            $data[] = $row;
        }
        $this->addSnippet('SelectiveTableSnippet', 'data', $data, 'class', 'browser table', 'columns', $displayColumns);
        $this->html->br();
        $this->compatibilityReportAction();
    }
352693
def act(self, action):
    """"""
    if action and action.ListFields():  # Skip no-ops.
      return self.actions(sc_pb.RequestAction(actions=[action]))
1366785
public function actionList() 
	{
		if(Yii::app()->request->isPostRequest) {
			$paging = trim($_POST['paging']);
			$pagesize = trim($_POST['pagesize']);
			
			$criteria=new CDbCriteria;
			$criteria->compare('publish', 1);
			$criteria->order = 'page_id DESC';
			
			if($paging && $paging == 'true') {
				$dataProvider = new CActiveDataProvider('OmmuPages', array(
					'criteria' => $criteria,
					'pagination' => array(
						'pageSize' => $pagesize ? $pagesize : 20,
					),
				));
				$model = $dataProvider->getData();
			} else {
				$criteria->limit = $pagesize ? $pagesize : 5;
				$model = OmmuPages::model()->findAll($criteria);
			}
			
			if(!empty($model)) {
				foreach($model as $key => $item) {
					$page_url = Utility::getProtocol().'://'.Yii::app()->request->serverName.Yii::app()->request->baseUrl;
					$page_path = 'public/page';
					
					if($item->media && file_exists($page_path.'/'.$item->media))
						$image_url_path = $page_url.'/'.$page_path.'/'.$item->media;
					
					$data[] = array(
						'id' => $item->page_id,
						'title' => $item->title->message,
						'description' => $item->desc ? Utility::shortText(Utility::hardDecode($item->description->message),200) : '-',
						'quote' => $item->quote ? $item->quote_r->message : '-',
						'media_image' => $image_url_path ? $image_url_path : '-',
						'media_show' => $item->media_show == 0 ? 'hide' : 'show',
						'media_type' => $item->media_show != 0 ? (($item->media_type == 0 || $item->media_type == 1) ? 'large' : 'medium') : '-',
						'creation_date' => strtotime($item->creation_date),
					);					
				}
			} else
				$data = array();
			
			if($paging && $paging == 'true') {
				$pager = OFunction::getDataProviderPager($dataProvider);
				$get = array_merge($_GET, array($pager['pageVar'] => $pager['nextPage']));
				$nextPager = $pager['nextPage'] != 0 ? OFunction::validHostURL(Yii::app()->controller->createUrl('list', $get)) : '-';
				$return = array(
					'data' => $data,
					'pager' => $pager,
					'nextPager' => $nextPager,
				);
				$this->_sendResponse(200, CJSON::encode($this->renderJson($return)));	
				
			} else
				$this->_sendResponse(200, CJSON::encode($this->renderJson($data)));
			
		} else 
			$this->redirect(Yii::app()->createUrl('site/index'));
	}
1222844
def show_actions(email, role):
    """"""
    if email:
        actions = ActionUsers.query.join(ActionUsers.user).filter(
            User.email.in_(email)
        ).all()
        for action in actions:
            click.secho('user:{0}:{1}:{2}:{3}'.format(
                action.user.email,
                action.action,
                '' if action.argument is None else action.argument,
                'deny' if action.exclude else 'allow',
            ), fg='red' if action.exclude else 'green')

    if role:
        actions = ActionRoles.query.filter(
            Role.name.in_(role)
        ).join(ActionRoles.role).all()
        for action in actions:
            click.secho('role:{0}:{1}:{2}:{3}'.format(
                action.role.name,
                action.action,
                '' if action.argument is None else action.argument,
                'deny' if action.exclude else 'allow',
            ), fg='red' if action.exclude else 'green')
661623
public function actionList()
	{
		$pages=new CPagination(Post::model()->count());
		$postList=Post::model()->findAll($this->getListCriteria($pages));

		$this->render('list',array(
			'postList'=>$postList,
			'pages'=>$pages));
	}
769484
public function showAction()
    {
        $this->showParameters = $this->showParameters + $this->defaultTokenParameters;
        $this->showSnippets   = $this->getToken()->getShowSnippetNames();

        parent::showAction();
    }
1344968
def get_menu_actions(self):
        """"""
        items = self.selectedItems()
        actions = self.get_actions_from_items(items)
        if actions:
            actions.append(None)
        actions += self.common_actions
        return actions
1031732
def arecord_user_action_on_item(action, uid, iid, optional = {})
      optional['targetEntityType'] = 'item'
      optional['targetEntityId'] = iid
      acreate_event(action, 'user', uid, optional)
    end
305580
protected function setDefaultRowActions()
    {
        $actions = $this->info->list->default_action ?: [];

        if (count($actions)) {
            return $this;
        }

        $addEditAction = config('cms-models.defaults.default-listing-action-edit', false);
        $addShowAction = config('cms-models.defaults.default-listing-action-show', false);

        if ( ! $addEditAction && ! $addShowAction) {
            return $this;
        }

        // The edit and/or show action should be set as default index row click action.

        $modelSlug        = $this->getRouteHelper()->getRouteSlugForModelClass(get_class($this->model));
        $permissionPrefix = $this->getRouteHelper()->getPermissionPrefixForModelSlug($modelSlug);

        if ($addEditAction) {
            $actions[] = [
                'strategy'    => ActionReferenceType::EDIT,
                'permissions' => "{$permissionPrefix}edit",
            ];
        }

        if ($addShowAction) {
            $actions[] = [
                'strategy'    => ActionReferenceType::SHOW,
                'permissions' => "{$permissionPrefix}show",
            ];
        }

        $this->info->list->default_action = $actions;

        return $this;
    }
1340644
def list_actions(cls):
        """"""
        # Make sure these are always at the beginning of the list
        actions = ['start', 'stop', 'restart', 'status']
        # Iterate over the instance attributes checking for actions that
        # have been exposed
        for func_name in dir(cls):
            func = getattr(cls, func_name)
            if (not hasattr(func, '__call__') or
                    not getattr(func, '__daemonocle_exposed__', False)):
                # Not a function or not exposed
                continue
            action = func_name.replace('_', '-')
            if action not in actions:
                actions.append(action)

        return actions