Get ...

@return array
An array of arrays as follows: array( array('label'=>$name0, 'value'=>$id0), array('label'=>$name1, 'value'=>$id1),…)
970559
public function getVoucherTypes()
  {
    $VoucherTypes = array();

    $this->VoucherType->byOrganization($this->AuthenticationManager->getCurrentUserOrganizationId())->each(function($VoucherType) use (&$VoucherTypes)
    {
      array_push($VoucherTypes, array('label'=> $VoucherType->name , 'value'=>$VoucherType->id));
    });

    return $VoucherTypes;
  }
55294
public function getValues()
    {
        $values = [];
        foreach ($this->findScenario() as $name) {
            $values[$name] = $this->$name;
        }
        return $values;
    }
1189968
public function toArray()
    {
        return array(
            'type'         => $this->getType(),
            'name'         => $this->getName(),
            'optional'     => $this->isOptional(),
            'defaultValue' => $this->getDefaultValue(),
            'description'  => $this->getDescription(),
        );
    }
963322
public function toArray(): array
    {
        return [
            'name' => $this->name,
            'text' => $this->text,
            'style' => $this->style,
            'type' => $this->type,
            'value' => $this->value,
            'confirm' => $this->confirm ? $this->confirm->toArray() : null,
        ];
    }
970231
public function __toArray()
    {
        $datas = [
            'id'   => (string)$this->id,
            'type' => (string)$this->type
        ];
        if ($this->attributes !== null) {
            $datas['attributes'] = $this->attributes->__toArray();
        }
        return $datas;
    }
187610
public static function get_taxonomies() {
		$items = [];

		// Get the taxonomies.
		$taxonomies = get_taxonomies(
			[
				'public' => true,
			]
		);

		// Build the array.
		foreach ( $taxonomies as $taxonomy ) {
			$id           = $taxonomy;
			$taxonomy     = get_taxonomy( $taxonomy );
			$items[ $id ] = $taxonomy->labels->name;
		}

		return $items;
	}
350471
function getValues()
    {
        $values = $this->getValue();
        $v = is_array($values)? $values : [$values];
        $r = [];
        foreach ($v as $name => $value){
            $r[$name] = new Values($value);
        }
        return $r;
    }
66777
public function getLabel() {
        if ($this->label) {
            return $this->translate($this->label);
        }
        $labels = array();
        if ($this->form->model && is_string($this->form->model)) {
            $class = $this->form->model;
            $labels = $class::getLabels();
        } elseif ($this->form->model && is_object($this->form->model)) {
            $class = get_class($this->form->model);
            $labels = $class::getLabels();
        }
        if (isset($labels[$this->name])) {
            return $this->translate($labels[$this->name]);
        }
        return $this->translate(ucwords(str_replace('_', ' ', $this->name)));
    }
1132922
public function get($label = null)
    {
        if ($label && array_key_exists($label, $this->results)) {
            return $this->results[$label];
        }
        $results = [];
        foreach ($this->results as $v) {
            if (is_array($v)) {
                $results = array_merge($results, $v);
            } else {
                $results[] = $v;
            }
        }

        return $results;
    }
889781
public function getValuesAsArray() {
		$values = [];
		foreach($this->getValues() as $value) {
			$values[$value->getId()] = $value->getName();
		}

		return $values;
	}
1237449
public function toArray()
    {
        $result = [];

        if (!empty($this->value)) {
            if (!empty($this->details)) {
                $parts = explode('.', $this->value);
                $result['value'] = join('.', array_slice($parts, 0, $this->details));
            } else {
                $result['value'] = $this->value;
            }
        }

        if (!empty($this->alias)) {
            $result['alias'] = $this->alias;
        }

        if (!empty($this->nickname)) {
            $result['nickname'] = $this->nickname;
        }

        if (isset($result['value']) && !isset($result['alias']) && !isset($result['nickname'])) {
            return $result['value'];
        }

        return $result;
    }
1258003
public function toArray()
    {
        $url = $this->url;

        $return = [];
        foreach (array_keys($url) as $key) {
            $getter = 'get' . ucfirst($key);
            $val = $this->$getter();

            if ($val !== null) {
                $return[$key] = $val;
            }
        }

        return $return;
    }
132357
public function getAsArray(): array
	{
		$data = [];

		foreach ($this->getBindings() as $bind) {
			$data[$bind->getParameter()] = $bind->getValue();
		}

		return $data;
	}
1283637
public function getValue()
    {
        $values = [];
        foreach($this->values as $key => $value) {
            $values[$key] = $value->getValue();
        }
        return $values;
    }
989254
public function toArray()
	{
		$result = array( 'localname' => $this->localName );
		if ( isset( $this->prefix ) ) array( 'prefix' => $this->prefix );
		if ( isset( $this->namespaceURI ) ) array( 'namespace' => $this->namespaceURI );
		return $result;
	}
902570
public function toOptionArray()
    {
        $result = $row = [];
        $i = 0;
        foreach ($this->times as $one) {
            if ($i == 0) {
                $row = [
                    'value' => $one,
                    'label' => $one . __(' Hour'),
                ];
            } else {
                $row = [
                    'value' => $one,
                    'label' => $one . __(' Hours'),
                ];
            }
            $result[] = $row;
            ++$i;
        }

        return $result;
    }
1249719
public function toArray()
    {
        return [
            'name'                      => $this->name,
            'label'                     => $this->label,
            'description'               => $this->description,
            'sandboxed'                 => $this->sandboxed,
            'supports_inline_execution' => $this->supportsInlineExecution,
        ];
    }