コード例 #1
0
ファイル: BaseController.php プロジェクト: Drake86cnf/yacare
 /**
  * Inicia las variables internas del controlador.
  *
  * Intenta adivinar el nombre del bundle y la entidad.
  */
 function IniciarVariables()
 {
     if (!isset($this->EmName)) {
         $this->EmName = 'default';
     }
     if (!isset($this->VendorName)) {
         $this->VendorName = \Tapir\BaseBundle\Helper\StringHelper::ObtenerAplicacion(get_class($this));
     }
     $PartesNombreClase = \Tapir\BaseBundle\Helper\StringHelper::ObtenerBundleYEntidad(get_class($this));
     if (!isset($this->BundleName)) {
         $this->BundleName = $PartesNombreClase[0];
     }
     if (!isset($this->EntityName)) {
         $this->EntityName = $PartesNombreClase[1];
     }
     if (!isset($this->CompleteEntityName)) {
         $this->CompleteEntityName = '\\' . $this->VendorName . '\\' . $this->BundleName . 'Bundle\\Entity\\' . $this->EntityName;
     }
     if (!isset($this->BaseRouteEntityName)) {
         $this->BaseRouteEntityName = $this->EntityName;
     }
     if (!isset($this->ConservarVariables)) {
         $this->ConservarVariables = array('filtro_buscar');
     }
 }