more @see Container::getNew()
@param $id
@param string $name
@return mixed
968419
public static function getNew($id, $name = '')
    {
        $container = self::getContainer($name);

        return $container->getNew($id);
    }
852574
public function findFieldsetOrCreateNew($name, Closure $callback = null)
    {
        foreach ($this->fieldsets as $fieldset) {
            if ($fieldset->getName() === $name) {
                $fieldset->update($callback);

                return $this->fieldsets;
            }
        }

        return $this->fieldset($name, $callback);
    }
651326
public function show($id)
    {
        $modelName = $this->modelFullName;
        $model = $modelName::find($id);
        if(!$model) throw new NotFoundException('There is no Resource with id = ' . $id . ' !');
        return $model;
    }
54724
public function get($id) {
		foreach($this->values as $container) {
			if($container->has($id)) {
				return $container->get($id);
			}
		}
		throw new NotFoundException("'$id' value not found");
	}
758975
private function getDefinition($id)
    {
        if (!$this->container->hasDefinition($id)) {
            return;
        }

        return $this->container->getDefinition($id);
    }
434829
protected function getPage($id)
    {
        $page = $this->pageManager->findOneBy(['id' => $id]);

        if (null === $page) {
            throw new NotFoundHttpException(sprintf('Page (%d) not found', $id));
        }

        return $page;
    }
977010
public function read($id, $next)
    {
        $data = $this->_read($id);
        if ( false === $data ) {
            $data = $next($id);
            if (false !== $data) {
                $item = new MemoryItem($data);
                $this->cache[$id] = $item;
            }
        }

        return $data;
    }
713045
public static function field($name, $id = null)
    {
        return self::getInstance()
                     ->getBuilder(FieldBehavior::class)
                     ->field($name)
                     ->id($id);
    }
712528
public function raw($id)
    {
        try {
            return parent::raw($id);
        } catch (UnknownIdentifierException $e) {
            throw new ContainerNotFoundException(
                $e->getMessage(),
                $e->getCode(),
                $e
            );
        } catch (\Throwable $e) {
            throw new ContainerException(
                $e->getMessage(),
                $e->getCode(),
                $e
            );
        }
    }
1200578
public function get($id)
    {
        if ($this->has($id) === false)
        {
            $message = 'Alias (%s) is not defined';

            $message = sprintf($message, $id);

            throw new NotFoundException($message);
        }

        return $this->objects[$id];
    }
776611
public function actionUpdate($id)
    {
        if (request()->post('_asnew') == '1') {
            $model = new Comment();
        }else{
            $model = $this->findModel($id);
        }

        if ($model->loadAll(request()->post())) {
            if ($model->saveAll()) {
                set_flash_has_been_saved();
                return $this->redirect(['update', 'id' => $model->id]);
            } else {
                set_flash_has_not_been_saved();
            }
        }

        return $this->render('update', [
            'model' => $model,
        ]);

    }
285447
public static function findOrCreate($id)
    {
        if ($data = static::find($id)) {
            return $data;
        }

        $id = static::getMapper()->normalizeID($id);

        return new static($id);
    }
600464
public function show($id)
    {
        $person = $this->client->get(sprintf('people/%d.json', $id));

        return new Person($this->response($person));
    }
100299
public function getChild($name, $forceNew = false)
    {
        if (!isset($this->children[$name]) || $forceNew) {
            return $this->createChild($name);
        }

        return $this->children[$name];
    }
1195804
public function clone(string $id, string $name): ?string
  {
    if ( \bbn\str::is_uid($id) && ($id_menu = $this->add(['text' => $name])) ){
      if ( ($bits = $this->pref->get_full_bits($id)) && !$this->_clone($id_menu, $bits) ){
        return null;
      }
      return $id_menu;
    }
    return null;
  }
991670
public function actionSaveAsNewLanguage($id)
    {
        if (request()->post('_asnew') == '1') {
            $product = $this->findModel($id);
            $model = new Product();
            $model->feature_img = $product->feature_img;
            $model->gallery = $product->gallery;
            $model->status = $product->status;
            $model->comment_status = $product->comment_status;
            $model->rating_status = $product->rating_status;
            $model->quantity = $product->quantity;
            $model->sku = $product->sku;
            $model->assign_with = $product->id;
        } else {
            $model = $this->findModel($id);
        }
        if ($model->loadAll(request()->post())) {
            if ($model->saveAll()) {
                set_flash_has_been_saved();
                create_all_term_relationships_of_all_term_type_of_product_type($model->product_type, $model->primaryKey);
                create_all_meta_of_all_product_type_meta($model->product_type, $model->primaryKey);
            } else {
                set_flash_has_not_been_saved();
            }
        }

        return $this->render('saveAsNewLanguage', [
            'model' => $model,
        ]);
    }
7428
public function edit($name, $id)
	{
		$model = Bauhaus::getInstance($name)->buildForm($id);

		return View::make($model->getView('edit'))
			->with('name',  $name)
			->with('model', $model)
			->with('id',    $id);
	}