Set the list of employees.

NOTE: This overrides the normal, automatic LazyJsonMapper setter! By
naming our function identically, we override its behavior!

@param array $employees

@throws LazyJsonMapperException

@return $this
775926
public function setEmployees(
        array $employees)
    {
        $this->_employees = $employees;

        // We now need to construct a new, inner value for the property. Since
        // it's a "mixed" property, it only accepts basic PHP types.
        $newInnerValue = [];
        foreach ($this->_employees as $k => $v) {
            $newInnerValue[$k] = is_object($v) && $v instanceof LazyJsonMapper
                               ? $v->asArray() // Throws.
                               : $v; // Is already a valid value.
        }

        // Now use the internal _setProperty() API to set the new inner value.
        // NOTE: This function only throws if the new value contains any
        // invalid non-basic data. Only basic PHP types are accepted.
        $this->_setProperty('employees', $newInnerValue);

        return $this;
    }
438031
public function setEditUsers( $users )
    {
        $this->editUsers = array_unique(
            is_array( $users ) ? $users : preg_split( '/[,\s]+/', $users )
        );

        return $this;
    }
1241490
public function setChildren(array $children)
    {

        $this->removeChildren();
        foreach ($children as $child)
            $this->appendChild($child);

        return $this;
    }
240130
public function setReferences($references)
    {
        $this->_references = [];
        foreach ($references as $name => $ref) {
            if (!array_key_exists('key', $ref)) {
                $ref['key'] = 'id';
            }
            $this->_references[$name] = $ref;
        }
        return $this;
    }
1067285
public function setJson($data)
    {
        if (is_array($data)) {
            $this->_json = $data;
        } elseif (is_string($data)) {
            $this->_json = ['code' => 1, 'message' => $data];
        } elseif (is_int($data)) {
            $this->_json = ['code' => $data, 'message' => $this->getMessage()];
        } else {
            $this->_json = $data;
        }

        return $this;
    }
198750
public function setOrganizations(array $organizations)
    {
        $this->hasOrganizationsProperty();

        $this->organizations = $organizations instanceof ArrayCollection ?
            $organizations :
            new ArrayCollection($organizations);
    }
158221
public function setUserFields(array $fields) {
        $clean = array();

        foreach ($fields as $base => $field) {
            if (is_numeric($base)) {
                $base = $field;
            }

            $clean[$base] = $field;
        }

        $this->userFields = $clean;

        return $this;
    }
244099
public function setItemList( $items )
	{
		if( !is_array( $items ) )
			throw new Exception( 'Item List must be an Array.' );
		$this->items	= array();
		foreach( $items as $item )
			$this->addItem( $item );
	}
596108
public function setEnableMultilang($employMultilanguage)
    {
        if ($this->_blEmployMultilanguage != $employMultilanguage) {
            $this->_blEmployMultilanguage = $employMultilanguage;
            if (!$employMultilanguage) {
                //#63T
                $this->modifyCacheKey("_nonml");
            }
            // reset
            $this->_sViewTable = false;
            if (count($this->_aFieldNames) > 1) {
                $this->_initDataStructure();
            }
        }
    }
497361
public function setItems($items)
    {
        $this->items = array();

        foreach ($items as $item) {
            $this->addItem($item);
        }

        return $this;
    }
862431
protected function setUserPassword(array & $users)
    {
        if (!empty($users)) {
            if (Arr::isAssoc($users)) {
                $users = [$users];
            }

            foreach ($users as $i => $user) {
                /** @noinspection PhpUndefinedMethodInspection */
                $model = User::find($user['id']);
                if (!empty($model)) {
                    $users[$i]['password'] = $model->password;
                }
            }
        }
    }
711147
public function setSubscribers($subscribers)
    {
        //flatten the array
        $subscribers = AnHelperArray::getValues(AnConfig::unbox($subscribers));
        $ids = array();

        foreach ($subscribers as $subscriber) {
            if (is($subscriber, 'AnDomainEntityAbstract')) {
                $ids[] = $subscriber->id;
            } else {
                $ids[] = $subscriber;
            }
        }

        $ids = array_unique($ids);

        if (!empty($ids)) {
            $this->set('subscriberIds', AnDomainAttribute::getInstance('set')->setData($ids));
        } else {
            $this->delete();
        }

        return $this;
    }
929886
public function set(array $job)
    {
        $result = null;
        $this->hook->attach('job.set.before', $job, $result, $this);

        if (isset($result)) {
            return (array) $result;
        }

        $default = $this->getDefault();
        $result = gplcart_array_merge($default, $job);
        $existing = $this->getSession($result['id']);

        if (!empty($existing)) {
            return (array) $existing;
        }

        $this->setSession($result);
        $this->hook->attach('job.set.after', $job, $result, $this);
        return (array) $result;
    }
906704
public function setList($list = [])
    {
        if (!is_array($list)) {
            $list = ArrayUtils::iteratorToArray($list);
        }

        $this->list = $list;
    }
652779
public function setItems(array $items)
    {
        $this->items = $items;
        $this->names = array_keys($items);

        return $this;
    }
826232
public function setListMapper(ListMapper $mapper)
	{
		$this->listMapper = $mapper;
		$mapper->setAdmin($this);
		return $this;
	}
333429
public function setChildren($children, $mapper = null)
    {
        $element = clone $this;

        $element->children = new Collection();

        return $element->addChildren($children, $mapper);
    }