當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Languages::defineActionOptions方法代碼示例

本文整理匯總了PHP中Languages::defineActionOptions方法的典型用法代碼示例。如果您正苦於以下問題:PHP Languages::defineActionOptions方法的具體用法?PHP Languages::defineActionOptions怎麽用?PHP Languages::defineActionOptions使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Languages的用法示例。


在下文中一共展示了Languages::defineActionOptions方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: showForm

 public function showForm($user_id = -1)
 {
     include_once "Casting.php";
     include_once "Client.php";
     include_once "Supplier.php";
     include_once "Product.php";
     include_once "Task.php";
     include_once "User.php";
     include_once "Eyecolor.php";
     include_once "Job.php";
     include_once "Haircolor.php";
     include_once "Profiletype.php";
     include_once "Skincolor.php";
     include_once "Relationship.php";
     include_once "Languages.php";
     include_once "Nationality.php";
     $this->prepareForm(-1, array('method' => 'post', 'includeTabs' => false, 'action' => base_url() . 'permissoes/aplicar/' . $user_id));
     $user = new User($user_id);
     if ($user->fields['administrador']) {
         AlertMessage::display(array("type" => AlertMessage::INFO, "msg" => "O usuário <b>" . $user->fields['usuario'] . "</b> é administrador, possui sempre permissão em tudo", "icon" => "ls-ico-info"));
     }
     echo "<ul id='tree_view_permissions' class='navmenu dree treeview treeviewPermissions'>";
     echo '<a name="topMenuTerrace" id="topMenuTerrace"></a>';
     echo '<li>Casting';
     echo "<ul>";
     $casting = new Casting();
     $casting->defineActionOptions();
     $actions = $casting->getActionOptions();
     $perm_name = $actions["add"]["permName"];
     echo "<li data-havepermission='" . self::havePermission($perm_name, $user_id) . "' data-permname='" . $perm_name . "'>" . $actions["add"]["label"] . "</li>";
     $perm_name = $actions["edit"]["permName"];
     echo "<li data-havepermission='" . self::havePermission($perm_name, $user_id) . "' data-permname='" . $perm_name . "'>" . $actions["edit"]["label"] . "</li>";
     foreach ($actions["actions"] as $index => $action) {
         $perm_name = $action['permName'];
         echo "<li data-havepermission='" . self::havePermission($perm_name, $user_id) . "' data-permname='" . $perm_name . "'>" . $action["label"] . "</li>";
     }
     echo "<li>Perfil";
     echo "<ul>";
     $profile_type = new Profiletype();
     $profile_type->defineActionOptions();
     $actions = $profile_type->getActionOptions();
     $perm_name = $actions["add"]["permName"];
     echo "<li data-havepermission='" . self::havePermission($perm_name, $user_id) . "' data-permname='" . $perm_name . "'>" . $actions["add"]["label"] . "</li>";
     foreach ($actions["actions"] as $index => $action) {
         $perm_name = $action['permName'];
         echo "<li data-havepermission='" . self::havePermission($perm_name, $user_id) . "' data-permname='" . $perm_name . "'>" . $action["label"] . "</li>";
     }
     echo "</ul>";
     echo "</li>";
     echo "<li>Cores de cabelo";
     echo "<ul>";
     $casting_hair = new Haircolor();
     $casting_hair->defineActionOptions();
     $actions = $casting_hair->getActionOptions();
     $perm_name = $actions["add"]["permName"];
     echo "<li data-havepermission='" . self::havePermission($perm_name, $user_id) . "' data-permname='" . $perm_name . "'>" . $actions["add"]["label"] . "</li>";
     foreach ($actions["actions"] as $index => $action) {
         $perm_name = $action['permName'];
         echo "<li data-havepermission='" . self::havePermission($perm_name, $user_id) . "' data-permname='" . $perm_name . "'>" . $action["label"] . "</li>";
     }
     echo "</ul>";
     echo "</li>";
     echo "<li>Cores de olhos";
     echo "<ul>";
     $casting_eye = new Eyecolor();
     $casting_eye->defineActionOptions();
     $actions = $casting_eye->getActionOptions();
     $perm_name = $actions["add"]["permName"];
     echo "<li data-havepermission='" . self::havePermission($perm_name, $user_id) . "' data-permname='" . $perm_name . "'>" . $actions["add"]["label"] . "</li>";
     foreach ($actions["actions"] as $index => $action) {
         $perm_name = $action['permName'];
         echo "<li data-havepermission='" . self::havePermission($perm_name, $user_id) . "' data-permname='" . $perm_name . "'>" . $action["label"] . "</li>";
     }
     echo "</ul>";
     echo "</li>";
     echo "<li>Etnias";
     echo "<ul>";
     $etnias = new Skincolor();
     $etnias->defineActionOptions();
     $actions = $etnias->getActionOptions();
     $perm_name = $actions["add"]["permName"];
     echo "<li data-havepermission='" . self::havePermission($perm_name, $user_id) . "' data-permname='" . $perm_name . "'>" . $actions["add"]["label"] . "</li>";
     foreach ($actions["actions"] as $index => $action) {
         $perm_name = $action['permName'];
         echo "<li data-havepermission='" . self::havePermission($perm_name, $user_id) . "' data-permname='" . $perm_name . "'>" . $action["label"] . "</li>";
     }
     echo "</ul>";
     echo "</li>";
     echo "<li>Nacionalidades";
     echo "<ul>";
     $nationality = new Nationality();
     $nationality->defineActionOptions();
     $actions = $nationality->getActionOptions();
     $perm_name = $actions["add"]["permName"];
     echo "<li data-havepermission='" . self::havePermission($perm_name, $user_id) . "' data-permname='" . $perm_name . "'>" . $actions["add"]["label"] . "</li>";
     foreach ($actions["actions"] as $index => $action) {
         $perm_name = $action['permName'];
         echo "<li data-havepermission='" . self::havePermission($perm_name, $user_id) . "' data-permname='" . $perm_name . "'>" . $action["label"] . "</li>";
     }
     echo "</ul>";
//.........這裏部分代碼省略.........
開發者ID:renanmedina,項目名稱:futuri.easycasting_mvc,代碼行數:101,代碼來源:Permission.php


注:本文中的Languages::defineActionOptions方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。