Updates a components ordering.

@return array
428087
public function postUpdateComponentOrder()
    {
        $componentData = Binput::get('ids');

        foreach ($componentData as $order => $componentId) {
            try {
                $component = Component::find($componentId);

                execute(new UpdateComponentCommand(
                    $component,
                    $component->name,
                    $component->description,
                    $component->status,
                    $component->link,
                    $order + 1,
                    $component->group_id,
                    $component->enabled,
                    $component->meta,
                    true
                ));
            } catch (QueryException $e) {
                throw new BadRequestHttpException();
            }
        }

        return $this->collection(Component::query()->orderBy('order')->get());
    }
1160594
public function updateOrderStatus()
    {
        $orderUpdated = false;
        $order = $this->getOrder();

        if (!is_null($order)) {
            $orderPayment = $this->getOrderPayment();
            $order = $this->recalculateAmounts($order);
            $newOrderStatus = $this->calculateOrderStatus($orderPayment, $order);
            $this->persistNewOrderStatus($order, $newOrderStatus);
            $orderUpdated = true;
        }

        return $orderUpdated;
    }
960286
protected function sortableUpdate()
    {
        $table = $this->getTableName();

        if (!$this->position || ($this->position && count($this->app['redbean']->find($table, 'position = ? AND id != ?', [$this->position, $this->id])))) {
            $position = $this->app['redbean']->getCell('SELECT position FROM '.$table.' ORDER BY position DESC LIMIT 1');
            $this->position = $position + 1;
        }
    }
1213767
protected function updateStatusOrder()
    {
        $this->controlAccess('order_edit');

        $submitted = array('status' => $this->getSubmitted('status'));

        if ($this->order->update($this->data_order['order_id'], $submitted)) {
            $submitted['notify'] = $this->setNotificationUpdateOrder($this->data_order['order_id']);
            $this->logUpdateStatusOrder($submitted);
            $messages = $this->getMassagesUpdateOrder();
            list($severity, $text) = $messages[$submitted['notify']];
            $this->redirect('', $this->text($text), $severity);
        }

        $this->redirect('', $this->text('Order has not been updated'), 'warning');
    }
741169
protected function update()
  {
    $this->cfg = [];
    foreach ( $this as $key => $var ){
      if ( $key !== 'cfg' && !\is_null($var) ){
        if ( \is_array($var) ){
          foreach ( $var as $k => $v ){
            if ( !isset($this->cfg[$key]) ){
              $this->cfg[$key] = [];
            }
            if ( !\is_null($v) ){
              $this->cfg[$key][$k] = $v;
            }
          }
        }
        else{
          $this->cfg[$key] = $var;
        }
      }
    }
    return $this;
  }
910774
function getReplacements() {
    // Get old style variable names.
    $module_data = $this->component_data;

    return array(
      '%module'       => $module_data['root_name'],
      '%Module'       => ucfirst($module_data['readable_name']),
      '%description'  => str_replace("'", "\'", $module_data['short_description']),
      '%name'         => !empty($module_data['readable_name']) ? str_replace("'", "\'", $module_data['readable_name']) : $module_data['root_name'],
      '%help'         => !empty($module_data['module_help_text']) ? str_replace('"', '\"', $module_data['module_help_text']) : 'TODO: Create admin help text.',
      '%readable'     => str_replace("'", "\'", $module_data['readable_name']),
    );
  }
575377
public function update($component)
    {
        $component = $this->component->findOrFail($component);

        $packages = $component->getComposerAttr('require', []);

        chdir(base_path());

        foreach ($packages as $name => $version) {
            $package = "\"{$name}:{$version}\"";

            $this->run("composer require {$package}");
        }
    }
696713
public function getUncheckedComponents()
    {
        $returnValue = array();

        
        $rootMock = $this->getRootComponent();
    	foreach($this->getComponents() as $c){
    		if (false === in_array($c, $this->getCheckedComponents()) && $c !== $rootMock){
    			array_push($returnValue, $c);
    		}
    	}
    	
    	// Sort the checked components to make them ordered in the same
        // way the related components where added.
        $components = $this->getComponents();
        $uncheckedComponents = array();
        foreach ($components as $c){
        	foreach ($returnValue as $uC){
        		if ($uC === $c){
        			array_push($uncheckedComponents, $uC);
        		}
        	}
        }
        
        $returnValue = $uncheckedComponents;
        

        return (array) $returnValue;
    }
911677
final public function getComponents()
    {
        if ($this->components === null) {
            $this->setComponents($this->getDefaultComponents());
        }
        return $this->components;
    }
676730
protected function makeDefaultComponents()
    {
        $components = parent::makeDefaultComponents();
        unset($components[ManagedList::RECORD_VIEW_ID]);
        $components[ManagedList::CONTROL_CONTAINER_ID]->setDestinationParentId(static::CONTROL_ROW_ID);
        $components[ManagedList::LIST_CONTAINER_ID]->setDestinationParentId(static::TABLE_BODY_ID);
        $components[ManagedList::SUBMIT_BUTTON_ID]->setDestinationParentId(static::CONTROL_ROW_ID);
        return array_merge(
            $components,
            [
                static::TABLE_ID => new Part(
                    new Tag('table'),
                    static::TABLE_ID,
                    static::FORM_ID
                ),
                static::TABLE_HEADING_ID => new Part(
                    new Tag('thead'),
                    static::TABLE_HEADING_ID,
                    static::TABLE_ID
                ),
                static::TITLE_ROW_ID => new Part(
                    new Tag('tr'),
                    static::TITLE_ROW_ID,
                    static::TABLE_HEADING_ID
                ),
                static::CONTROL_ROW_ID => new Part(
                    new SolidRow(),
                    static::CONTROL_ROW_ID,
                    static::TABLE_HEADING_ID
                ),
                static::TABLE_BODY_ID => new Part(new Tag('tbody'), static::TABLE_BODY_ID, static::TABLE_ID),
                static::RECORD_VIEW_ID => new RecordView(new Tag('tr')),
                static::TABLE_FOOTER_ID => new Part(new Tag('tfoot'), static::TABLE_FOOTER_ID, static::TABLE_ID),
            ]
        );
    }
1023469
private function update() {
        // pre-processing hook
        if ($this->beforeUpdate() !== true)
            return $this;

        $mapping = $this->dao()->getMapping();
        $changes = [];

        // collect modified properties and their values
        foreach ($mapping['properties'] as $property) {                 // TODO: Until the dirty check is implemented all
            $propertyName = $property['name'];                          //       properties are assumed dirty.
            $changes[$propertyName] = $this->$propertyName;
        }

        // perform update
        if ($this->doUpdate($changes)) {
            $this->_modified = false;

            // post-processing hook
            $this->afterUpdate();
        }
        return $this;
    }
13088
private function prepareSortOrders()
    {
        $sortOrders = [];

        foreach ($this->_orders as $attribute => $direction) {
            $sortParams = ['direction' => $direction];
            $sortField = $attribute;
            $sortOrders[$sortField] = $sortParams;
        }

        return $sortOrders;
    }
411712
public function orderKeys() {
        $result = $this->orderElements($this->keys);
        if ($result) {
            $this->setKeys($result);
            return true;
        } else {
            return false;
        }
    }
1199886
public function sort()
    {
        $this->sorted = array();
        $hasChanged   = true;
        while (count($this->sorted) < count($this->items) && $hasChanged) {
            $hasChanged = false;
            foreach ($this->dependencies as $item => $deps) {
                if ($this->satisfied($item)) {
                    $this->setSorted($item);
                    $this->removeDependents($item);
                    $hasChanged = true;
                }
                $this->hits[$item]++;
            }
        }

        return $this->sorted;
    }
455919
public function update()
    {
        if (!isset($this->_links->self->href)) {
            return $this;
        }

        $body = json_encode(array(
            "billingAddress" => $this->billingAddress,
            "shippingAddress" => $this->shippingAddress,
        ));

        $result = $this->client->performHttpCallToFullUrl(MollieApiClient::HTTP_PATCH, $this->_links->self->href, $body);

        return ResourceFactory::createFromApiResult($result, new Order($this->client));
    }
1345087
public function postUpdateComponent(Component $component)
    {
        try {
            execute(new UpdateComponentCommand(
                $component,
                $component->name,
                $component->description,
                Binput::get('status'),
                $component->link,
                $component->order,
                $component->group_id,
                $component->enabled,
                $component->meta,
                false
            ));
        } catch (QueryException $e) {
            throw new BadRequestHttpException();
        }

        return $this->item($component);
    }
1083076
public function updateConfigurationSuccess()
    {
        $url     = route(area() . '.modules.index');
        $message = trans('antares/foundation::response.extensions.configuration-success');

        return $this->redirectWithMessage($url, $message);
    }