Get the array of selected Contact objects in the table.
@return array of Contacts, zero length if nothing is selected
327172
public Contact[] getSelectedContacts() {
		int[] selected = getTable().getSelectedRows();
		Contact[] contacts = new Contact[selected.length];
		for (int i = 0; i < selected.length; i++) {
			contacts[i] = (Contact) getTableModel().getElementAt(selected[i]);
		}
		return contacts;
	}
559195
public function get_selected_users() {
        // Do a lazy load.
        if (is_null($this->selected)) {
            $this->selected = $this->load_selected_users();
        }
        return $this->selected;
    }
773994
public function contactableAttendees() {
		$attendees = $this->Attendees();
		foreach ($this->stat("registrant_fields") as $field) {
			$attendees = $attendees->where("\"".$field."\" IS NOT NULL");
		}
		return $attendees;
	}
689333
public static function get_contacts() {
        global $CFG, $PAGE, $USER;

        // Check if messaging is enabled.
        if (empty($CFG->messaging)) {
            throw new moodle_exception('disabled', 'message');
        }

        require_once($CFG->dirroot . '/user/lib.php');

        $allcontacts = array('online' => [], 'offline' => [], 'strangers' => []);
        $contacts = \core_message\api::get_contacts_with_unread_message_count($USER->id);
        foreach ($contacts as $contact) {
            // Set the mode.
            $mode = 'offline';
            if (\core_message\helper::is_online($contact->lastaccess)) {
                $mode = 'online';
            }

            $newcontact = array(
                'id' => $contact->id,
                'fullname' => fullname($contact),
                'unread' => $contact->messagecount
            );

            $userpicture = new user_picture($contact);
            $userpicture->size = 1; // Size f1.
            $newcontact['profileimageurl'] = $userpicture->get_url($PAGE)->out(false);
            $userpicture->size = 0; // Size f2.
            $newcontact['profileimageurlsmall'] = $userpicture->get_url($PAGE)->out(false);

            $allcontacts[$mode][$contact->id] = $newcontact;
        }

        $strangers = \core_message\api::get_non_contacts_with_unread_message_count($USER->id);
        foreach ($strangers as $contact) {
            $newcontact = array(
                'id' => $contact->id,
                'fullname' => fullname($contact),
                'unread' => $contact->messagecount
            );

            $userpicture = new user_picture($contact);
            $userpicture->size = 1; // Size f1.
            $newcontact['profileimageurl'] = $userpicture->get_url($PAGE)->out(false);
            $userpicture->size = 0; // Size f2.
            $newcontact['profileimageurlsmall'] = $userpicture->get_url($PAGE)->out(false);

            $allcontacts['strangers'][$contact->id] = $newcontact;
        }

        // Add noreply user and support user to the list, if they don't exist.
        $supportuser = core_user::get_support_user();
        if (!isset($strangers[$supportuser->id]) && !$supportuser->deleted) {
            $supportuser->messagecount = message_count_unread_messages($USER, $supportuser);
            if ($supportuser->messagecount > 0) {
                $supportuser->fullname = fullname($supportuser);
                $supportuser->unread = $supportuser->messagecount;
                $allcontacts['strangers'][$supportuser->id] = $supportuser;
            }
        }

        $noreplyuser = core_user::get_noreply_user();
        if (!isset($strangers[$noreplyuser->id]) && !$noreplyuser->deleted) {
            $noreplyuser->messagecount = message_count_unread_messages($USER, $noreplyuser);
            if ($noreplyuser->messagecount > 0) {
                $noreplyuser->fullname = fullname($noreplyuser);
                $noreplyuser->unread = $noreplyuser->messagecount;
                $allcontacts['strangers'][$noreplyuser->id] = $noreplyuser;
            }
        }

        return $allcontacts;
    }
1338661
public function getContactData($addressData, Contact $contact = null)
    {
        $result = array();
        // if account is set, take account's name
        if ($addressData && isset($addressData['firstName']) && isset($addressData['lastName'])) {
            $result['firstName'] = $addressData['firstName'];
            $result['lastName'] = $addressData['lastName'];
            $result['fullName'] = $result['firstName'] . ' ' . $result['lastName'];
            if (isset($addressData['title'])) {
                $result['title'] = $addressData['title'];
            }
            if (isset($addressData['salutation'])) {
                $result['salutation'] = $addressData['salutation'];
            }
        } elseif ($contact) {
            $result['firstName'] = $contact->getFirstName();
            $result['lastName'] = $contact->getLastName();
            $result['fullName'] = $contact->getFullName();
            $result['salutation'] = $contact->getFormOfAddress();
            if ($contact->getTitle() !== null) {
                $result['title'] = $contact->getTitle()->getTitle();
            }
        } else {
            throw new MissingAttributeException('firstName, lastName or contact');
        }

        return $result;
    }
601951
public JMethod []getDeclaredMethods()
  {
    ArrayList<JavaMethod> methodList = getMethodList();
    
    JMethod[] methods = new JMethod[methodList.size()];

    methodList.toArray(methods);

    return methods;
  }
210788
protected function getOrderStatusesList()
    {
        $result = array();

        // Because many users won't know how to deselect a single option in a
        // multiple select element, an empty option is added.
        $result['0'] = $this->t('option_empty_triggerOrderStatus');
        $result += $this->shopCapabilities->getShopOrderStatuses();

        return $result;
    }
765048
private function findContactsByIds($ids)
    {
        if (0 === count($ids)) {
            return [];
        }

        $queryBuilder = $this->entityManager->createQueryBuilder()
            ->select('CONCAT(\'c\', c.id) AS id, CONCAT(CONCAT(c.firstName, \' \'), c.lastName) AS name')
            ->from($this->contactEntityClass, 'c')
            ->where('c.id IN (:ids)');

        $query = $queryBuilder->getQuery();
        $query->setParameter('ids', $ids);

        return $query->getArrayResult();
    }
555437
public Feature[] getSelectedFeatures() {
		Collection<org.geomajas.gwt.client.map.feature.Feature> selection = getLayer().getSelectedFeatureValues();
		Feature[] features = new Feature[selection.size()];
		int count = 0;
		for (org.geomajas.gwt.client.map.feature.Feature feature : selection) {
			features[count] = new FeatureImpl(feature.toDto(), this);
			count++;
		}
		return features;
	}
577073
public static function createContactsFromObjects(array $objects = null)
    {
        if ($objects === null) {
            return null;
        }

        $contacts = [];

        foreach ($objects as $object) {
            $contact = new static();
            $contact->updateFromObject($object);

            $contacts[] = $contact;
        }

        return $contacts;
    }
649179
public AtomContactSet getAtomContacts() {

		AtomContactSet contacts = new AtomContactSet(cutoff);

		List<Contact> list = getIndicesContacts();

		if (jAtomObjects == null) {
			for (Contact cont : list) {
				contacts.add(new AtomContact(new Pair<Atom>(iAtomObjects[cont.getI()],iAtomObjects[cont.getJ()]),cont.getDistance()));
			}

		} else {
			for (Contact cont : list) {
				contacts.add(new AtomContact(new Pair<Atom>(iAtomObjects[cont.getI()],jAtomObjects[cont.getJ()]),cont.getDistance()));
			}
		}

		return contacts;
	}
1139030
public function getRecipients()
    {

        if (empty($this->recipients)) {
            return [];
        }
        $recipients = ($this->recipients instanceof Collection) ? $this->recipients->toArray() : $this->recipients;


        if (!is_array($recipients)) {
            return $recipients;
        }
        $return = [];

        foreach ($recipients as $recipient) {
            if ($recipient instanceof \Illuminate\Database\Eloquent\Model) {
                if ($this->type == 'email' and ! isset($recipient->email)) {
                    continue;
                }
                if ($this->type == 'email') {
                    array_push($return, $recipient->email);
                }
                if ($this->type == 'sms' and ! isset($recipient->phone)) {
                    continue;
                }
                if ($this->type == 'sms') {
                    array_push($return, $recipient->phone);
                }
            }
        }
        return array_filter(array_unique($return));
    }
840380
public Object[] getMethods() {
        Method[] methods = getClassUnderInspection().getMethods();
        Constructor[] ctors = getClassUnderInspection().getConstructors();
        Object[] result = new Object[methods.length + ctors.length];
        int resultIndex = 0;
        for (; resultIndex < methods.length; resultIndex++) {
            Method method = methods[resultIndex];
            result[resultIndex] = methodInfo(method);
        }
        for (int i = 0; i < ctors.length; i++, resultIndex++) {
            Constructor ctor = ctors[i];
            result[resultIndex] = methodInfo(ctor);
        }
        return result;
    }
982773
public DataObject[] getDataObjectArray(){
        DataObject[] res = new DataObject[this.dataList.size()];
        return this.dataList.toArray(res);
    }
914302
public function actionIndex()
    {
        $searchModel = new ContactSearch();
        $dataProvider = $searchModel->search(request()->queryParams);
        $dataProvider->sort->defaultOrder = ['id' => SORT_DESC];

        return $this->render('index', [
            'searchModel' => $searchModel,
            'dataProvider' => $dataProvider,
        ]);
    }
430278
public function getDealerContactIds()
    {
        if (null === $this->dealer_contact_ids_unserialized) {
            $this->dealer_contact_ids_unserialized = array();
        }
        if (!$this->dealer_contact_ids_unserialized && null !== $this->dealer_contact_ids) {
            $dealer_contact_ids_unserialized = substr($this->dealer_contact_ids, 2, -2);
            $this->dealer_contact_ids_unserialized = $dealer_contact_ids_unserialized ? explode(' | ', $dealer_contact_ids_unserialized) : array();
        }

        return $this->dealer_contact_ids_unserialized;
    }
197284
def get_contacts(self):
        
        all_contacts = self.wapi_functions.getAllContacts()
        return [Contact(contact, self) for contact in all_contacts]