Get the list of marking_workflow states the current user has permission to transition a grade to.

@return array of state => description
777765
public function get_marking_workflow_states_for_current_user() {
        if (!empty($this->markingworkflowstates)) {
            return $this->markingworkflowstates;
        }
        $states = array();
        if (has_capability('mod/assign:grade', $this->context)) {
            $states[ASSIGN_MARKING_WORKFLOW_STATE_INMARKING] = get_string('markingworkflowstateinmarking', 'assign');
            $states[ASSIGN_MARKING_WORKFLOW_STATE_READYFORREVIEW] = get_string('markingworkflowstatereadyforreview', 'assign');
        }
        if (has_any_capability(array('mod/assign:reviewgrades',
                                     'mod/assign:managegrades'), $this->context)) {
            $states[ASSIGN_MARKING_WORKFLOW_STATE_INREVIEW] = get_string('markingworkflowstateinreview', 'assign');
            $states[ASSIGN_MARKING_WORKFLOW_STATE_READYFORRELEASE] = get_string('markingworkflowstatereadyforrelease', 'assign');
        }
        if (has_any_capability(array('mod/assign:releasegrades',
                                     'mod/assign:managegrades'), $this->context)) {
            $states[ASSIGN_MARKING_WORKFLOW_STATE_RELEASED] = get_string('markingworkflowstatereleased', 'assign');
        }
        $this->markingworkflowstates = $states;
        return $this->markingworkflowstates;
    }
606878
protected function getWithdrawableOperations()
    {
        $toWithdrawSuccess = $this->operationManager->findByStatus(new Status(Status::TRANSFER_SUCCESS));

        $toWithdrawFailed = $this->operationManager->findByStatus(new Status(Status::WITHDRAW_FAILED));

        $toWithdrawNegative = $this->operationManager->findByStatus(new Status(Status::WITHDRAW_NEGATIVE));

        $toWithdrawBlocked = $this->operationManager->findByStatus(new Status(Status::WITHDRAW_PAYMENT_BLOCKED));

        return array_merge($toWithdrawBlocked, $toWithdrawNegative, $toWithdrawFailed, $toWithdrawSuccess);
    }
818789
public function getReplacements() {
		// Get member who began this request
		return array_merge(
			$this->Pipeline()->getReplacements(),
			array(
				// Note that this actually displays the link to the interface to approve,
				// not the direct link to the approve action
				'<approvelink>' => Director::absoluteURL($this->Pipeline()->Environment()->Link())
			)
		);
	}
689667
public static function get_applicable_publish_states() {
        global $CFG;
        $options = array();

        // Everyone gets draft access.
        if ($CFG->bloglevel >= BLOG_USER_LEVEL) {
            $options['draft'] = get_string('publishtonoone', 'blog');
        }

        if ($CFG->bloglevel > BLOG_USER_LEVEL) {
            $options['site'] = get_string('publishtosite', 'blog');
        }

        if ($CFG->bloglevel >= BLOG_GLOBAL_LEVEL) {
            $options['public'] = get_string('publishtoworld', 'blog');
        }

        return $options;
    }
785527
public function behaviors() {

		return [
			'rbac' => [
				'class' => Yii::$app->core->getRbacFilterClass(),
				'actions' => [
					'profile'  => [ 'permission' => CoreGlobal::PERM_ADMIN ],
					'settings'  => [ 'permission' => CoreGlobal::PERM_ADMIN ]
				]
			],
			'verbs' => [
				'class' => VerbFilter::class,
				'actions' => [
					'profile'  => [ 'get', 'post' ],
					'settings'  => [ 'get', 'post' ]
				]
			]
		];
	}
411128
public function getWorkflowFields()
    {
        $action    = $this->CurrentAction();
        $options   = $this->validTransitions();
        $wfOptions = $options->map('ID', 'Title', ' ');
        $fields    = new FieldList();

        $fields->push(new HeaderField('WorkflowHeader', $action->Title));

        $fields->push(HiddenField::create('TransitionID', ''));
        // Let the Active Action update the fields that the user can interact with so that data can be
        // stored for the workflow.
        $action->updateWorkflowFields($fields);
        $action->invokeWithExtensions('updateWorkflowFields', $fields);
        return $fields;
    }
285441
public function managerGetSessions()
    {
        $theSessions = [];

        /* @var $session \Thruway\Session */
        foreach ($this->sessions as $session) {

            $sessionRealm = null;
            // just in case the session is not in a realm yet
            if ($session->getRealm() !== null) {
                $sessionRealm = $session->getRealm()->getRealmName();
            }

            if ($session->getAuthenticationDetails() !== null) {
                $authDetails = $session->getAuthenticationDetails();
                $auth        = [
                    'authid'     => $authDetails->getAuthId(),
                    'authmethod' => $authDetails->getAuthMethod()
                ];
            } else {
                $auth = new \stdClass();
            }

            $theSessions[] = [
                'id'           => $session->getSessionId(),
                'transport'    => $session->getTransport()->getTransportDetails(),
                'messagesSent' => $session->getMessagesSent(),
                'sessionStart' => $session->getSessionStart(),
                'realm'        => $sessionRealm,
                'auth'         => $auth
            ];
        }

        return $theSessions;
    }
681714
protected function getSyncMapPermissions() {
        if (!$this->_syncMapPermissions) {
            $this->_syncMapPermissions = new SyncMapPermissionList(
                $this->version,
                $this->solution['serviceSid'],
                $this->solution['sid']
            );
        }

        return $this->_syncMapPermissions;
    }
1012302
static public function getNotifiableStates()
    {
        $states = [];
        foreach (static::getConfig() as $state => $config) {
            if ($config[2]) {
                $states[] = $state;
            }
        }
        return $states;
    }
1272587
public function getCommitables()
    {
        $data = array();

        foreach ($this->_entities as $entity) {
            if ($entity->getEntityState() & AnDomain::STATE_COMMITABLE) {
                $data[] = $entity;
            }
        }

        return $data;
    }
1048567
public function getTransitions()
    {
        if (count($this->transitions) == 0 && !$this->isInitialType() && !$this->isExceptionType()) {
            foreach ($this->properties['transitions_from'] as $transition) {
                array_push($this->transitions, new Transition($this, $transition));
            }

            if (count($this->transitions) == 0) {
                throw new StatusException('No transitions available', 100, null);
            }
        } elseif ($this->isInitialType() || $this->isExceptionType()) {
            $this->transitions = [];
        }

        return $this->transitions;
    }
973414
protected function getCurrentState()
    {
        return [
            'application_name' => $this->config->get('application_name'),
            'application' => realpath($this->paths->getBasePath()),
            'configuration' => realpath($this->paths->getConfigurationPath()),
            'logs' => $this->paths->getLogsPath(),
        ];
    }
325685
public function getCandidatesStatus(): array
    {
        $candidates = [];

        foreach ($this->getElectedCandidates() as $candidate) {
            $candidates['elected'][] = $candidate->getId();
        }

        foreach ($this->getActiveCandidates() as $candidate) {
            $candidates['active'][] = [$candidate->getId(), $candidate->getVotes()];
        }

        foreach ($this->getDefeatedCandidates() as $candidate) {
            $candidates['defeated'][] = $candidate->getId();
        }

        return $candidates;
    }
877255
protected function getCumulativeStatistics() {
        if (!$this->_cumulativeStatistics) {
            $this->_cumulativeStatistics = new WorkflowCumulativeStatisticsList(
                $this->version,
                $this->solution['workspaceSid'],
                $this->solution['sid']
            );
        }

        return $this->_cumulativeStatistics;
    }
484821
public Flow[] getFlows()
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
    {
      SibTr.entry(tc, "getFlows");
    }
    Flow[] flows = classifications.getFlows();
    
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
    {
      SibTr.exit(tc, "getFlows", flows);
    }    
    return flows;
  }
198411
public function getStatusesHuman()
    {
        return [
            self::STATUS_PENDING          => 'Pending',
            self::STATUS_PROCESSING       => 'Processing',
            self::STATUS_COMPLETE         => 'Complete',
            self::STATUS_FAILED           => 'Failed',
            self::STATUS_REFUNDED         => 'Refunded',
            self::STATUS_REFUNDED_PARTIAL => 'Partially Refunded',
        ];
    }
1282512
public function getState()
    {
        return [
            'items' => $this->items,
            'rules' => $this->rules,
            'nested' => $this->nested,
            'dynamic' => $this->dynamic,
            'filter' => $this->filter
        ];
    }