Created
April 13, 2015 20:13
-
-
Save makamo/4befb91df2c1005eb753 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Model\Entity; | |
use Cake\Database\Expression\QueryExpression; | |
use Cake\ORM\Entity; | |
use Cake\ORM\TableRegistry; | |
use Carbon\Carbon; | |
use Versadrill\Periode; | |
/** | |
* Paie Entity. | |
*/ | |
class Paie extends Entity | |
{ | |
public $periode_Fin; | |
public $periode_debut; | |
/** | |
* Fields that can be mass assigned using newEntity() or patchEntity(). | |
* | |
* @var array | |
*/ | |
protected $_accessible = [ | |
'*' => true, | |
]; | |
protected function _setDate(){ | |
$date = $this->_setPeriode()["debut"]; | |
return $date; | |
} | |
/** | |
* Déclare la date de debut et de fin d'une période | |
*/ | |
protected function _setPeriode() | |
{ | |
$p = Periode::getStartAndEndDate($this->week,$this->year); | |
$this->periode_debut =$p["debut"]; | |
$this->periode_Fin = $p["fin"]; | |
return $p; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment