当前位置: 首页>>代码示例>>PHP>>正文


PHP Empleado::getIdempleado方法代码示例

本文整理汇总了PHP中Empleado::getIdempleado方法的典型用法代码示例。如果您正苦于以下问题:PHP Empleado::getIdempleado方法的具体用法?PHP Empleado::getIdempleado怎么用?PHP Empleado::getIdempleado使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Empleado的用法示例。


在下文中一共展示了Empleado::getIdempleado方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: filterByEmpleado

 /**
  * Filter the query by a related Empleado object
  *
  * @param   Empleado|PropelObjectCollection $empleado The related object(s) to use as filter
  * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return                 ExpedientearchivoQuery The current query, for fluid interface
  * @throws PropelException - if the provided filter is invalid.
  */
 public function filterByEmpleado($empleado, $comparison = null)
 {
     if ($empleado instanceof Empleado) {
         return $this->addUsingAlias(ExpedientearchivoPeer::IDEMPLEADO, $empleado->getIdempleado(), $comparison);
     } elseif ($empleado instanceof PropelObjectCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(ExpedientearchivoPeer::IDEMPLEADO, $empleado->toKeyValue('PrimaryKey', 'Idempleado'), $comparison);
     } else {
         throw new PropelException('filterByEmpleado() only accepts arguments of type Empleado or PropelCollection');
     }
 }
开发者ID:vicbaporu,项目名称:ITRADE,代码行数:22,代码来源:BaseExpedientearchivoQuery.php

示例2: editarAction

 public function editarAction()
 {
     $id = $this->params()->fromRoute('id');
     $request = $this->getRequest();
     if ($request->isPost()) {
         $post_data = $request->getPost();
         //INSTANCIAMOS NUESTRA ENTIDAD
         $entity = \ClienteQuery::create()->findPk($id);
         //SETIAMOS NUESTROS DATOS CON EXCEPCIONES
         foreach ($post_data as $key => $value) {
             if (\ClientePeer::getTableMap()->hasColumn($key) && !empty($value) && $key != 'cliente_cumpleanios') {
                 $entity->setByName($key, $value, \BasePeer::TYPE_FIELDNAME);
             }
         }
         if (!empty($post_data['cliente_cumpleanios'])) {
             $cliente_cumpleanios = date_create_from_format('d/m/Y', $post_data['cliente_cumpleanios']);
             $entity->setClienteCumpleanios($cliente_cumpleanios);
         }
         $entity->save();
         //Agregamos un mensaje
         $this->flashMessenger()->addSuccessMessage('Registro guardado exitosamente!');
         //REDIRECCIONAMOS A LA ENTIDAD QUE ACABAMOS DE CREAR
         return $this->redirect()->toRoute('admin/clientes/editar', array('id' => $entity->getIdcliente()));
     }
     $exist = \ClienteQuery::create()->filterByIdcliente($id)->exists();
     if ($exist) {
         $entity = \ClienteQuery::create()->findPk($id);
         $empleados = \EmpleadoQuery::create()->filterByIdempleado(1, \Criteria::NOT_EQUAL)->find();
         $empleados_array = array();
         $empleado = new \Empleado();
         foreach ($empleados as $empleado) {
             $id = $empleado->getIdempleado();
             $empleados_array[$id] = $empleado->getEmpleadoNombre() . ' ' . $empleado->getEmpleadoApellidopaterno() . ' ' . $empleado->getEmpleadoApallidomaterno();
         }
         $form = new \Admin\Clientes\Form\ClientesForm($empleados_array);
         $form->setData($entity->toArray(\BasePeer::TYPE_FIELDNAME));
         //LOS ARCHIVOS
         $files = \ClientearchivoQuery::create()->filterByIdcliente($entity->getIdcliente())->find();
         $files_array = array();
         $file = new \Clientearchivo();
         foreach ($files as $file) {
             $file_path = $file->getClientearchivoArchivo();
             $file_name = explode('files/clientes/' . $entity->getIdcliente() . '/', $file->getClientearchivoArchivo());
             $tmp['id'] = $file->getIdclientearchivo();
             $tmp['name'] = $file_name[1];
             $tmp['size'] = $file->getClientearchivoSize();
             $tmp['type'] = mime_content_type($_SERVER['DOCUMENT_ROOT'] . '/' . $file->getClientearchivoArchivo());
             $files_array[] = $tmp;
         }
         //RETORNAMOS A NUESTRA VISTA
         $view_model = new ViewModel();
         $view_model->setTemplate('admin/clientes/clientes/editar');
         $view_model->setVariables(array('entity' => json_encode($entity->toArray(\BasePeer::TYPE_FIELDNAME)), 'successMessages' => json_encode($this->flashMessenger()->getSuccessMessages()), 'form' => $form, 'files' => json_encode($files_array)));
         return $view_model;
     } else {
         return $this->redirect()->toRoute('admin/clientes', array('action' => 'index'));
     }
 }
开发者ID:vicbaporu,项目名称:ITRADE,代码行数:58,代码来源:ClientesController.php

示例3: prune

 /**
  * Exclude object from result
  *
  * @param   Empleado $empleado Object to remove from the list of results
  *
  * @return EmpleadoQuery The current query, for fluid interface
  */
 public function prune($empleado = null)
 {
     if ($empleado) {
         $this->addUsingAlias(EmpleadoPeer::IDEMPLEADO, $empleado->getIdempleado(), Criteria::NOT_EQUAL);
     }
     return $this;
 }
开发者ID:jalvarez14,项目名称:hva,代码行数:14,代码来源:BaseEmpleadoQuery.php

示例4: setEmpleado

 /**
  * Declares an association between this object and a Empleado object.
  *
  * @param                  Empleado $v
  * @return Empleadofacturacion The current object (for fluent API support)
  * @throws PropelException
  */
 public function setEmpleado(Empleado $v = null)
 {
     if ($v === null) {
         $this->setIdempleado(NULL);
     } else {
         $this->setIdempleado($v->getIdempleado());
     }
     $this->aEmpleado = $v;
     // Add binding for other direction of this n:n relationship.
     // If this object has already been added to the Empleado object, it will not be re-added.
     if ($v !== null) {
         $v->addEmpleadofacturacion($this);
     }
     return $this;
 }
开发者ID:jalvarez14,项目名称:hva,代码行数:22,代码来源:BaseEmpleadofacturacion.php

示例5: addInstanceToPool

 /**
  * Adds an object to the instance pool.
  *
  * Propel keeps cached copies of objects in an instance pool when they are retrieved
  * from the database.  In some cases -- especially when you override doSelect*()
  * methods in your stub classes -- you may need to explicitly add objects
  * to the cache in order to ensure that the same objects are always returned by doSelect*()
  * and retrieveByPK*() calls.
  *
  * @param Empleado $obj A Empleado object.
  * @param      string $key (optional) key to use for instance map (for performance boost if key was already calculated externally).
  */
 public static function addInstanceToPool($obj, $key = null)
 {
     if (Propel::isInstancePoolingEnabled()) {
         if ($key === null) {
             $key = (string) $obj->getIdempleado();
         }
         // if key === null
         EmpleadoPeer::$instances[$key] = $obj;
     }
 }
开发者ID:jalvarez14,项目名称:hva,代码行数:22,代码来源:BaseEmpleadoPeer.php

示例6: serversideAction

 public function serversideAction()
 {
     $request = $this->getRequest();
     if ($request->isPost()) {
         //EL MAPEO DE NUESTRA TABALA
         $table_map = array(0 => 'empleado_nombre', 1 => 'empleado_email', 2 => 'empleado_celular', 3 => 'empleado_rol');
         $post_data = $request->getPost();
         //NUESTRA QUERY
         $query = new \EmpleadoQuery();
         $query->filterByIdempleado(1, \Criteria::NOT_EQUAL);
         //ORDER
         if (isset($post_data['order'])) {
             $order = $table_map[$post_data['order'][0]['column']];
             $dir = $post_data['order'][0]['dir'];
             $query->orderBy($order, $dir);
         } else {
             $query->orderByIdempleado(\Criteria::DESC);
         }
         if (!empty($post_data['search']['value'])) {
             $search = $post_data['search']['value'];
             $c = new \Criteria();
             $c1 = $c->getNewCriterion('empleado.empleado_nombre', '%' . $search . '%', \Criteria::LIKE);
             $c2 = $c->getNewCriterion('empleado.empleado_apallidomaterno', '%' . $search . '%', \Criteria::LIKE);
             $c3 = $c->getNewCriterion('empleado.empleado_apellidopaterno', '%' . $search . '%', \Criteria::LIKE);
             $c4 = $c->getNewCriterion('empleado.empleado_celular', '%' . $search . '%', \Criteria::LIKE);
             $c5 = $c->getNewCriterion('empleado.empleado_rol', '%' . $search . '%', \Criteria::LIKE);
             $c1->addOr($c2)->addOr($c3)->addOr($c4)->addOr($c5);
             $query->addAnd($c1);
         }
         //EL TOTAL DE LA BUSQUEDA
         $recordsFiltered = $query->count();
         //SUSTITUIMOS VARIABLES SI NOS LAS ENVIAN POR LA URL
         if (isset($post_data['url_params']['limit']) && isset($post_data['url_params']['page'])) {
             $post_data['length'] = (int) $post_data['url_params']['limit'];
             $post_data['start'] = 0;
             if ((int) $post_data['url_params']['page'] > 1) {
                 $post_data['start'] = $post_data['url_params']['limit'] * ((int) $post_data['url_params']['page'] - 1);
             }
         }
         //LIMIT
         $query->setOffset((int) $post_data['start']);
         $query->setLimit((int) $post_data['length']);
         //DAMOS EL FORMATO CORRECTO
         $data = array();
         $value = new \Empleado();
         foreach ($query->find() as $value) {
             $tmp['DT_RowId'] = $value->getIdempleado();
             $tmp['empleado_nombre'] = $value->getEmpleadoNombre() . ' ' . $value->getEmpleadoApellidopaterno() . ' ' . $value->getEmpleadoApallidomaterno();
             $tmp['empleado_email'] = $value->getEmpleadoEmail();
             $tmp['empleado_celular'] = $value->getEmpleadoCelular();
             $tmp['empleado_rol'] = ucfirst($value->getEmpleadoRol());
             $tmp['empleado_options'] = '<a data-toggle="tooltip" data-placement="left" title="Editar" href="/catalogo/empleados/editar/' . $value->getIdempleado() . '"><i class="fa fa-pencil"></i></a><a class="delete" data-toggle="tooltip" data-placement="left" title="Eliminar" href="javascript:void(0)"><i class="fa fa-trash-o"></i></a>';
             $data[] = $tmp;
         }
         //El arreglo que regresamos
         $json_data = array("draw" => (int) $post_data['draw'], "recordsFiltered" => $recordsFiltered, "data" => $data, "page" => $post_data['url_params']['page']);
         return $this->getResponse()->setContent(json_encode($json_data));
     }
 }
开发者ID:vicbaporu,项目名称:ITRADE,代码行数:59,代码来源:EmpleadoController.php


注:本文中的Empleado::getIdempleado方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。