- Ordenación en grid de candidatos (faltan los filtros) git-svn-id: https://192.168.0.254/svn/Proyectos.Incam_IntranetNueva/trunk@74 77cfc57b-8ef4-1849-9df6-4a38aa5da120
79 lines
2.1 KiB
PHP
79 lines
2.1 KiB
PHP
<?php
|
|
|
|
/**
|
|
* Modelo para el tablero
|
|
*
|
|
*/
|
|
class Tablero extends CModel {
|
|
|
|
private function getActividadPortlet() {
|
|
$model=new Candidato('search');
|
|
|
|
$portlet = array(
|
|
'id' => 'actividad_candidatos',
|
|
'header' => 'Resumen de actividad de candidatos (últimos 7 días)',
|
|
'content' => array(
|
|
'model' => $model
|
|
)
|
|
);
|
|
return $portlet;
|
|
}
|
|
|
|
private function getSituacionCandidatosPortlet() {
|
|
$candidatos = new Candidato('search');
|
|
|
|
$total = $candidatos->count();
|
|
|
|
$portlet = array(
|
|
'id' => 'situacion_candidatos',
|
|
'header' => 'Situación actual',
|
|
'content' => array(
|
|
'total' => $total
|
|
)
|
|
);
|
|
return $portlet;
|
|
}
|
|
|
|
|
|
/**
|
|
*
|
|
* @return array lista de portlets del tablero
|
|
*/
|
|
public function getPortlets() {
|
|
$portlets = array();
|
|
$portlets['actividad_candidatos'] = $this->getActividadPortlet();
|
|
$portlets['situacion_candidatos'] = $this->getSituacionCandidatosPortlet();
|
|
|
|
return $portlets;
|
|
}
|
|
|
|
/**
|
|
* Returns the list of attribute names.
|
|
* By default, this method returns all public properties of the class.
|
|
* You may override this method to change the default.
|
|
* @return array list of attribute names. Defaults to all public properties of the class.
|
|
*/
|
|
public function attributeNames()
|
|
{
|
|
$className=get_class($this);
|
|
if(!isset(self::$_names[$className]))
|
|
{
|
|
$class=new ReflectionClass(get_class($this));
|
|
$names=array();
|
|
foreach($class->getProperties() as $property)
|
|
{
|
|
$name=$property->getName();
|
|
if($property->isPublic() && !$property->isStatic())
|
|
$names[]=$name;
|
|
}
|
|
return self::$_names[$className]=$names;
|
|
}
|
|
else
|
|
return self::$_names[$className];
|
|
}
|
|
}
|
|
|
|
|
|
|
|
?>
|