Imprime una comanda en particular

@param  id $comanda_id
@return null
509496
public static function comanda ( Comanda $Comanda )
    {
    	$comanda_id = $Comanda->id;
    	
		$productos_x_comanda = array();
		// se supone que en una comanda yo no voy a tener productos que se impriman en comanderas distitas
		// (esto es separado desde el mismo controlador y se manda aimprimir a comandas diferentes)
		// pero , por las dudas que ésto suceda, cuando yo listo los productos de una comanda, me los separa para ser impreso en Comanderas distintas
		// Entonces, por lo genral (SIEMPRE) se imprimiria x 1 sola Comandera en este método del Componente

		$comanderas_involucradas = $Comanda->comanderas_involucradas($comanda_id);	

		// genero el array lindo paraimprimir por cada comanda
		// o sea, genero un renglón de la comanda
		// por ejmeplo me queraria algo asi:
		// "1) Milanesa de pollo\n"
    $comanderasRet = array();
		foreach($comanderas_involucradas as $printer_id):
			if ( !empty($printer_id) ) {
				$ret = Printaitor::send( $Comanda, $printer_id, 'comandas');
        $comanderasRet[$printer_id] = $ret;
			}
		endforeach;

    return $comanderasRet;
   }
1344636
public function find($id) {
        if ((string)$this->id === (string)$id) {
            return $this;
        }
        foreach ($this->subtree as $tab) {
            if ($obj = $tab->find($id)) {
                return $obj;
            }
        }
        return null;
    }
1301234
public function assignChildren ($relationIdentifier, $id, $childIds, $subtractive = true)
		{
			$relation = $this->getRelation($relationIdentifier);
			$childIds = (array)$childIds;

			if (! $relation) {
				throw new RelationException('Invalid relation `' . $relationIdentifier);
			}

			if ($relation instanceof OneToMany) {
				$this->database->createQuery()
					->update()
					->table($relation->getRelatedTable())
					->set(
						array(
							$relation->getRelatedKey() => $id,
						)
					)
					->whereIn($this->database->primaryKey($relation->getRelatedTable()), $childIds)
					->execute();

				if ($subtractive) {
					$this->database->createQuery()
						->update()
						->table($relation->getRelatedTable())
						->set(
							array(
								$relation->getRelatedKey() => null,
							)
						)
						->whereEqual($relation->getRelatedKey(), $id)
						->whereNotIn($this->database->primaryKey($relation->getRelatedTable()), $childIds)
						->execute();
				}
			} else if ($relation instanceof ManyToMany) {
				if ($subtractive) {
					$this->database->createQuery()
						->delete()
						->from($relation->getRelationalTable())
						->whereEqual($relation->getKey(), $id)
						->whereNotIn($relation->getRelatedKey(), $childIds)
						->execute();
				}

				$query = $this->database->createQuery();

				$assignedIds =
					$query->select($relation->getRelatedKey())
						->from($relation->getRelationalTable())
						->whereEqual($relation->getKey(), $id)
						->execute()
						->fetchColumn();

				$newIds = array_diff($childIds, $assignedIds);

				foreach ($newIds as $newId) {
					$this->database->createQuery()
						->insert()
						->into($relation->getRelationalTable())
						->set(
							array(
								$relation->getKey()        => $id,
								$relation->getRelatedKey() => $newId,
							)
						)
						->execute();
				}
			} else {
				throw new RelationException('Invalid relation type `' . gettype($relation) . '`');
			}
		}
971172
public function getForm($id)
    {
        return (isset($this->forms[$id])) ? $this->forms[$id] : null;
    }
796029
public static function get($id){
		if( isset(self::$instances[$id]) ){
			return self::$instances[$id];
		}
		return null;
	}
425147
public function getModuleById($id)
    {
        $modules = \JModuleHelper::getModules(null);

        $total = count($modules);

        for ($i = 0; $i < $total; $i++)
        {
            if ($modules[$i]->id == $id)
            {
                return $modules[$i];
            }
        }

        return null;
    }
1082587
public function contentId($id = null)
    {
        if ($id === null) {
            return $this->_contentId;
        }
        $this->_contentId = $id;
    }
1370767
public function selectById($id)
	{
		$sql = "SELECT * FROM `$this->tableName` WHERE `$this->pkColName` = %d ";
		$stmt = $this->pdo->prepare(sprintf($sql, $id));
		$res = $stmt->execute();

		if ($res === false) {
			return null;
		}

		$rows = $stmt->fetchAll();

		if (count($rows) !== 1) {
			return null;
		}

		return $this->prepareEntity($rows[0]);
	}
336443
public function get($id, $ignore_cache = false){
        if( empty($this->primary_key) ){
            return null;
        }
        $row = $this->where("{$this->table}.{$this->primary_key} = %d", $id)->get_row('', $ignore_cache);
        if( $row && $this->result_class ){
            return new $this->result_class($row);
        }else{
            return $row;
        }
    }
1131656
public function getById(int $id)
    {
        $result = $this->builder->getById($id);

        if (isset($result[0])) {
            return self::instance($result[0]);
        }

        return null;
    }
80971
private function getAdmin($id)
    {
        $admin = $this->adminPool->getContainer()->get($id);

        if ($admin instanceof  AdminInterface) {
            return $admin;
        }

        return null;
    }
895788
protected function beforeCiiAction($id=NULL)
    {
        // If we do not have an ID, consider it to be null, and throw a 404 error
        if ($id == NULL)
            throw new CHttpException(404, Yii::t('ciims.core', 'The specified post cannot be found.'));
        
        // Retrieve the HTTP Request
        $r = new CHttpRequest();
        
        // Retrieve what the actual URI
        $requestUri = str_replace($r->baseUrl, '', $r->requestUri);
        
        // Retrieve the route
        $route = '/' . $this->getRoute() . '/' . $id;
        $requestUri = preg_replace('/\?(.*)/','',$requestUri);
        
        // If the route and the uri are the same, then a direct access attempt was made, and we need to block access to the controller
        if ($requestUri == $route)
            throw new CHttpException(404, Yii::t('ciims.core', 'The requested post cannot be found.'));
        
        return str_replace($r->baseUrl, '', $r->requestUri);
    }
1345420
protected function _post($id = null)
    {
        $subject = $this->_subject();
        $subject->set(['id' => $id]);

        $entity = $this->_findRecord($id, $subject);

        $event = $this->_trigger('beforeDelete', $subject);
        if ($event->isStopped()) {
            return $this->_stopped($subject);
        }

        $method = $this->getConfig('deleteMethod');
        if ($this->_table()->$method($entity)) {
            $this->_success($subject);
        } else {
            $this->_error($subject);
        }

        return $this->_redirect($subject, ['action' => 'index']);
    }
468884
public function getCalculation($id)
    {
        if ($this->calculations === null) {
            $this->execute();
        }

        return isset($this->calculations[$id]) ? $this->calculations[$id] : null;
    }
338756
public function findCacheById(int $id, int $siteId = null)
    {

        // Resolve siteId
        $siteId = SiteHelper::resolveSiteId($siteId);

        // Check if already in addToCache
        if ($this->isCachedById($id, $siteId)) {
            return $this->cacheById[$siteId][$id];
        }

        return null;
    }
523478
public function actionIndexPost($id=NULL)
	{
		if ($id === NULL)
			return $this->createComment();
		else
			return $this->updateComment($id);
	}
941761
public function fetchById($int_key_id)
    {
        $arr_results = $this->fetchByIds([$int_key_id]);
        if(count($arr_results) > 0) {
            return $arr_results[0];
        }
        return null;
    }