Outils pour utilisateurs

Outils du site


informatique:php:cakephp

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentesRévision précédente
Prochaine révision
Révision précédente
informatique:php:cakephp [20/02/2022 10:52] – hierarchical data cyrilleinformatique:php:cakephp [03/03/2022 08:45] (Version actuelle) – [Tips] cyrille
Ligne 13: Ligne 13:
   * [[https://www.cakedc.com/amanda/2020/10/19/best-cakephp-plugins|Best CakePHP Plugins]] by Amanda on October 19, 2020   * [[https://www.cakedc.com/amanda/2020/10/19/best-cakephp-plugins|Best CakePHP Plugins]] by Amanda on October 19, 2020
  
-Articles+===== Tips ===== 
 + 
 + 
 +==== User info ==== 
 + 
 +Récupérer l'utilisateur connecté hors d'un controller ou view 
 + 
 +<code php> 
 +            $r = Router::getRequest(); 
 +            if( $r ) 
 +            { 
 +                $i = /*$this->getRequest()*/ $r->getAttribute( 'identity' ); 
 +                if( $i ) 
 +                { 
 +                    Log::debug(__METHOD__.' is logged'); 
 +                    $user = $i->getOriginalData(); 
 +                } 
 +                else 
 +                { 
 +                    Log::debug(__METHOD__.' not logged'); 
 +                } 
 + 
 +            } 
 +            else 
 +            { 
 +                Log::debug(__METHOD__.' no request'); 
 +            } 
 + 
 +</code> 
 +==== PhpUnit Migrations ==== 
 + 
 +Ajouter un tableau vide pour les migrations de l'application: 
 +<code php> 
 +$migrator->runMany([ 
 +    [], 
 +    ['plugin' => $plug->getName()] 
 +]); 
 +</code> 
 + 
 +[[https://github.com/CakeDC/users/issues/984|souvenir]] 
 +==== datatables ====
  
   * [[https://www.tutspointer.com/datatables-with-ajax-pagination-search-filter-in-cakephp-3-using-bootstrap-3-mysql-and-jquery/|Datatables with Ajax Pagination, Search Filter in CakePHP 3 Using Bootstrap 3, MySQL and jQuery]]   * [[https://www.tutspointer.com/datatables-with-ajax-pagination-search-filter-in-cakephp-3-using-bootstrap-3-mysql-and-jquery/|Datatables with Ajax Pagination, Search Filter in CakePHP 3 Using Bootstrap 3, MySQL and jQuery]]
-  * hierarchical data, tree structure+ 
 +==== hierarchical data, tree structure ==== 
     * [[https://book.cakephp.org/4/en/orm/behaviors/tree.html|CakePhp TreeBehavior]] CakePhp4     * [[https://book.cakephp.org/4/en/orm/behaviors/tree.html|CakePhp TreeBehavior]] CakePhp4
     * [[https://www.dereuromark.de/2013/02/17/cakephp-and-tree-structures/|CakePHP and Tree structures]] 2013     * [[https://www.dereuromark.de/2013/02/17/cakephp-and-tree-structures/|CakePHP and Tree structures]] 2013
 +      * and his [[https://github.com/dereuromark/cakephp-tools/blob/master/docs/Helper/Tree.md|Tree Helper]]
 +    * [[https://stackoverflow.com/questions/44347448/cakephp-3-tree-behavior-on-associated-model|cakephp 3 tree behavior on associated model]] 2017
  
  
  
informatique/php/cakephp.1645350756.txt.gz · Dernière modification : 20/02/2022 10:52 de cyrille

Sauf mention contraire, le contenu de ce wiki est placé sous les termes de la licence suivante : CC0 1.0 Universal
CC0 1.0 Universal Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki