Get or set the most common data for a particuliar view(s) in a
 performant way (more performant than attr)
 For example, text for UILabel, image for UIImageView

 @return [RMQ]
8372
def data(new_data = :rmq_not_provided)
      if new_data != :rmq_not_provided
        selected.each do |view|
          case view
          when UILabel              then view.setText new_data # set is faster than =
          when UIButton             then view.setTitle(new_data, forState: UIControlStateNormal)
          when UIImageView          then view.image = new_data
          #when UITableView          then
          when UISwitch             then view.setOn(new_data)
          #when UIDatePicker         then
          #when UISegmentedControl   then
          #when UIRefreshControl     then
          #when UIPageControl        then
          #when UISlider             then
          #when UIStepper            then
          #when UITabBar             then
          #when UITableViewCell      then
          when UITextView           then view.text = new_data
          when UITextField          then view.text = new_data
          #when UINavigationBar      then
          #when UIScrollView         then
          when UIProgressView       then view.setProgress(new_data, animated: true)

          # TODO, finish
          end
        end

        self
      else
        out = selected.map do |view|
          case view
          when UILabel              then view.text
          when UIButton             then view.titleForState(UIControlStateNormal)
          when UIImageView          then view.image
          #when UITableView          then
          when UISwitch             then view.on?
          #when UIDatePicker         then
          #when UISegmentedControl   then
          #when UIRefreshControl     then
          #when UIPageControl        then
          #when UISlider             then
          #when UIStepper            then
          #when UITabBar             then
          #when UITableViewCell      then
          when UITextView           then view.text
          when UITextField          then view.text
          #when UINavigationBar      then
          #when UIScrollView         then
          when UIProgressView       then view.progress

          # TODO, finish
          end
        end

        out = out.first if out.length == 1
        out
      end
    end
9567
def get_all_image_lists(custom_headers:nil)
      response = get_all_image_lists_async(custom_headers:custom_headers).value!
      response.body unless response.nil?
    end
11322
def data(self, data, part=False, dataset=''):
        
        #if self.parser is None:
        #    raise ValueError('no parser')
        imgs = self.imgtype.convert(data)
        for channel, data in zip(self.imgtype.channels, imgs):
            key = dataset + channel
            data = self.scanner(data, part)
            if isinstance(self.parser, LevelParser):
                self.storage.add_links(self.parser(data, part, key))
            else:
                for level, level_data in enumerate(data):
                    level_key = key + level_dataset(level)
                    level_data = self.parser(level_data, part, level_key)
                    self.storage.add_links(level_data)
502581
def data_object(data)
      data = data.keys.first if data.is_a?(Hash) && data.keys.size == 1
      data = @_object.__send__(data) if data.is_a?(Symbol) && defined?(@_object) && @_object && @_object.respond_to?(data)
      data
    end
150286
def decode(data)
      return nil if data.nil? || data.strip.empty?
      decode_object(@load.call(data))
    end
493821
def getIRData(self):
        '''
        

        '''     
        if self.hasproxy():
            self.lock.acquire()
            ir = self.ir
            self.lock.release()
            return ir

        return None
1326154
private void obtainStyledAttributes() {
        obtainUseSplitScreen();
        obtainNavigationWidth();
        obtainNavigationVisibility();
        obtainOverrideNavigationIcon();
        obtainShowButtonBar();
        obtainNextButtonText();
        obtainBackButtonText();
        obtainFinishButtonText();
        obtainShowProgress();
        obtainProgressFormat();
        obtainBreadCrumbVisibility();
        obtainToolbarElevation();
        obtainBreadcrumbElevation();
        obtainCardViewElevation();
        obtainButtonBarElevation();
        obtainCardViewBackgroundColor();
        obtainBreadCrumbBackgroundColor();
        obtainButtonBarBackground();
        obtainNavigationBackground();
        obtainNavigationSelectionColor();
        obtainNavigationDividerColor();
    }
314595
public function getViewsData() {
    $data = parent::getViewsData();
    $data['mentions_field_data']['table']['base']['help'] = t('Mentions entry');

    $data['mentions_field_data']['table']['wizard_id'] = 'mention';
    $data['mentions_field_data']['mid']['field']['id'] = 'mid';

    $data['mentions_field_data']['table']['group'] = t('Mentions');
    $data['mentions_field_data']['table']['entity type'] = 'mentions';

    $data['mentions_field_data']['table']['base']['title'] = t('Mentions');

    $data['mentions_field_data']['table']['base']['weight'] = 1;
    $data['mentions_field_data']['table']['base']['defaults']['field'] = 'mid';

    $data['mentions_field_data']['mid'] = [
      'title' => t('Mention ID'),
      'help' => t('Mention ID'),
      'field' => [
        'id' => 'numeric',
      ],
    ];

    $data['mentions_field_data']['entity_type'] = [
      'title' => t('Entity type'),
      'help' => t('Entity type of entity that contains mention'),
      'field' => [
        'id' => 'standard',
      ],
      'filter' => [
        'id' => 'standard',
      ],
    ];

    $data['mentions_field_data']['title'] = [
      'title' => t('Title'),
      'help' => t('Title of entity containing mention'),
      'real field' => 'mid',
      'field' => [
        'id' => 'mentions_title',
      ],
      'relationship' => [
        'base' => 'node_field_data',
        'base field' => 'title',
        'relationship field' => 'nid',
        'title' => t('Mention Title'),
        'help' => t('Mention Title'),
        'id' => 'standard',
        'label' => t('Mention Title'),
      ],
    ];

    $data['mentions_field_data']['auid'] = [
      'title' => t('Author user id'),
      'help' => t('Author user id'),
      'filter' => [
        'id' => 'standard',
      ],
      'argument' => [
        'id' => 'standard',
      ],
      'field' => [
        'id' => 'standard',
      ],
      'relationship' => [
        'base' => 'users',
        'title' => t('User'),
        'help' => t('The user that authored the mention'),
        'id' => 'standard',
        'label' => t('Mentions user'),
      ],
    ];

    $data['mentions_field_data']['uid'] = [
      'title' => t('Mentioned user uid'),
      'help' => t('The user that is mentioned'),
      'relationship' => [
        'base' => 'users',
        'title' => t('User'),
        'help' => t('The user that is mentioned'),
        'id' => 'standard',
        'label' => t('Mentions user'),
      ],
      'filter' => [
        'id' => 'standard',
      ],
      'argument' => [
        'id' => 'standard',
      ],
      'field' => [
        'id' => 'standard',
      ],
    ];

    $data['mentions_field_data']['created'] = [
      'title' => t('Date'),
      'help' => t('Date'),
      'field' => [
        'id' => 'date',
      ],
      'sort' => [
        'id' => 'date',
      ],
      'argument' => [
        'id' => 'date',
      ],
    ];

    $data['mentions_field_data']['entity_id'] = [
      'title' => t('Entity id'),
      'help' => t('The unique ID of the object that contains mention'),
      'field' => [
        'id' => 'standard',
      ],
      'sort' => [
        'id' => 'standard',
      ],
      'argument' => [
        'id' => 'numeric',
      ],
    ];

    $data['mentions_field_data']['link'] = [
      'title' => t('Link'),
      'real field' => 'mid',
      'help' => t('Link to entity that contains mention'),
      'field' => [
        'id' => 'mentions_link',
      ],
    ];

    return $data;
  }
721425
def data
      @data ||= begin
        list = @xml.find('/e:epp/e:response/e:resData/node()').reject { |n| n.empty? }
        list.size > 1 ? list : list[0]
      end
    end
74855
def data(self, index, role=Qt.DisplayRole):
        

        if not index.isValid():
            return QVariant()

        node = self.get_node(index)
        if index.column() == 0:
            if hasattr(node, "roles"):
                if role == Qt.DecorationRole:
                    return QIcon(node.roles.get(role, ""))
                else:
                    return node.roles.get(role, QVariant())
        else:
            attribute = self.get_attribute(node, index.column())
            if attribute:
                if hasattr(attribute, "roles"):
                    if role == Qt.DecorationRole:
                        return QIcon(attribute.roles.get(role, ""))
                    else:
                        return attribute.roles.get(role, QVariant())
        return QVariant()
775776
def finish
      retval = {}
      # Ensure all required attributes have been set
      @attributes.each do |attr|
        val = instance_variable_get "@#{attr}"
        raise ArgumentError, "Missing attribute #{attr}" if val.nil?
        retval[attr] = val
      end
      retval
    end
1223263
def findViewWithAttributeOrRaise(self, attr, val, root="ROOT"):
        '''
        
        '''

        view = self.findViewWithAttribute(attr, val, root)
        if view:
            return view
        else:
            raise ViewNotFoundException(attr, val, root)
950319
public function & getViewData () {
		if ($this->view !== NULL) return $this->view;
		$user = & \MvcCore\Ext\Auths\Basic::GetInstance()->GetUser();
		$authenticated = $user instanceof \MvcCore\Ext\Auths\Basics\IUser;
		$this->view = (object) [
			'user'			=> $user,
			'authenticated'	=> $authenticated,
		];
		return $this->view;
	}
1140671
protected function __data()
    {
        // Dummy array for iterated output
        $people   = [];
        $people[] = 'John Do';
        $people[] = 'Jane Do';
        $people[] = 'Foo Bar';
        $people[] = 'Bar Baz';

        // Data used as key => value pairs for template engine
        $data = [
            'title'  => 'Doozr\'s bootstrap environment',
            'year'   => date('Y'),
            'people' => $people,
        ];

        // Just store and trigger dispatch to view -> render by observer pattern
        $this->setData($data);

        return true;
    }
237926
def [](attr)
      return nil unless instance_variable_defined?(:@attributes) and @attributes.is_a?(Hash)
      @attributes[attr] or (attr.is_a?(String) ? @attributes[attr.to_sym] : @attributes[attr.to_s])
    end
849054
protected function getViewData()
    {
        $user = \common_session_SessionManager::getSession()->getUser();
        $hasAccessToReactivate = AclProxy::hasAccess($user, MonitorProctorAdministrator::class, 'reactivateExecutions', array());
        $delivery = $this->getCurrentDelivery();
        $guiSettingsService = $this->getServiceLocator()->get(GuiSettingsService::SERVICE_ID);
        $assessmentResultsService = $this->getServiceLocator()->get(AssessmentResultsService::SERVICE_ID);
        $data = [
            'ismanageable' => false,
            'set' => [],
            'extrafields' => DeliveryHelper::getExtraFields(),
            'categories' => DeliveryHelper::getAllReasonsCategories($hasAccessToReactivate),
            'printReportButton' => $assessmentResultsService->getOption(AssessmentResultsService::OPTION_PRINT_REPORT_BUTTON),
            'printReportUrl' => $assessmentResultsService->getScoreReportUrlParts(),
            'timeHandling' => $this->getServiceLocator()->get(DeliveryExecutionStateService::SERVICE_ID)->getOption(DeliveryExecutionStateService::OPTION_TIME_HANDLING),
            'historyUrl' => $this->getServiceLocator()->get(TestSessionHistoryService::SERVICE_ID)->getHistoryUrl($delivery),
            'refreshBtn' => $guiSettingsService->getOption(GuiSettingsService::PROCTORING_REFRESH_BUTTON),
            'autoRefresh' => $guiSettingsService->getOption(GuiSettingsService::PROCTORING_AUTO_REFRESH),
            'canPause' => $guiSettingsService->getOption(GuiSettingsService::PROCTORING_ALLOW_PAUSE),
            'onlineStatus' => $this->getServiceLocator()->get(TestSessionConnectivityStatusService::SERVICE_ID)->hasOnlineMode(),
            'hasAccessToReactivate' => $hasAccessToReactivate
        ];

        if (!is_null($delivery)) {
            $data['delivery'] = $delivery->getUri();
        }
        if ($this->hasRequestParameter('context')) {
            $data['context'] = $this->getRequestParameter('context');
        }

        return $data;
    }
420442
def _loadData(self, data):
        
        self._setValue = None
        self.id = data.attrib.get('id')
        self.label = data.attrib.get('label')
        self.summary = data.attrib.get('summary')
        self.type = data.attrib.get('type')
        self.default = self._cast(data.attrib.get('default'))
        self.value = self._cast(data.attrib.get('value'))
        self.hidden = utils.cast(bool, data.attrib.get('hidden'))
        self.advanced = utils.cast(bool, data.attrib.get('advanced'))
        self.group = data.attrib.get('group')
        self.enumValues = self._getEnumValues(data)