This file contains 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 | |
/** | |
* Reorder Social Accounts | |
*/ | |
private function up1024_reorderSocialAccountOptions($accounts) { | |
$socialAccounts = civicrm_api3('OptionValue', 'get', [ | |
'option_group_id' => 'website_type', | |
'name' => ['IN' => $accounts], | |
]); |
This file contains 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 | |
public function saveSomethig($data){ | |
$datasource = $this->getDataSource(); | |
$datasource->begin(); | |
if(!$this-Model1->save($data)){ | |
$datasource->rollback() | |
return false; | |
} | |
if(!$this-Model2->save($data)){ |
This file contains 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 | |
public function base_fund() | |
{ | |
//Lemos a biblioteca PHPExcel | |
App::import('Helper', 'PhpExcel'); | |
$this->PHPExcel = new PhpExcelHelper(new View()); | |
//Lemos o ficheiro excel a preencher. Aquele que foi fornecido pelos financiadores | |
$xls = $this->PHPExcel->loadWorksheetFromS3('/Reports/Financas/base_fund.xlsx'); |