当前位置: 首页>>代码示例>>PHP>>正文


PHP Text::getText方法代码示例

本文整理汇总了PHP中Text::getText方法的典型用法代码示例。如果您正苦于以下问题:PHP Text::getText方法的具体用法?PHP Text::getText怎么用?PHP Text::getText使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Text的用法示例。


在下文中一共展示了Text::getText方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: delete

 function delete() {
     Category::requirePermission("DELETE");
     $link = Database::getConnection();
     $query = "DELETE FROM category WHERE id=".Database::sqlValue($this->id);
     mysql_query($query) or die(Database::formatError($query, Text::getText("QueryFailed")));
     Database::returnConnection($link);
 }
开发者ID:elecnix,项目名称:smellyfish,代码行数:7,代码来源:Category.php

示例2: printContent

 function printContent() {
     ?>
       <table border="0">
         <tr bgcolor=<?=BGCOLOR_ALT?>>
           <th>#</th>
           <? if (SecurityGroup::havePermission("DELETE")) { ?>
             <th></th>
           <? } ?>
           <th><?=Text::getText("Name")?></th>
           <th>&nbsp;</th>
           <th>&nbsp;</th>
         </tr>
         <? $bg = TRUE; ?>
         <? foreach ($this->groups as $g) { ?>
           <? $bg = !$bg; ?>
           <tr<? if ($bg) { ?> bgcolor=<?=BGCOLOR_ALT?><? } ?>>
             <td>&nbsp;<?=$g->getId()?>&nbsp;</td>
             <? if (SecurityGroup::havePermission("DELETE")) { ?>
               <td><a href="<?=$this->groupDeletePage?>?<?=$this->groupDeleteParamGroupId?>=<?=$g->getId()?>" onClick="return confirm('<?=Text::getText('ConfirmDeleteGroup')?>')"><img src="<?=$this->imgDeleteSrc?>" border="0" alt="<?=Text::getText('Delete')?>"></a></td>
             <? } ?>
             <td>&nbsp;<a href="<?=$this->groupEditPage?>?<?=$this->groupEditParamGroupId?>=<?=$g->getId()?>"><?=$g->getName()?></a>&nbsp;</td>
             <td>&nbsp;<a href="<?=$this->groupMembersPage?>?<?=$this->groupMembersParamGroupId?>=<?=$g->getId()?>"><?=Text::getText("Members")?></a>&nbsp;</td>
             <td>&nbsp;<a href="<?=$this->groupPermissionsPage?>?<?=$this->groupPermissionsParamGroupId?>=<?=$g->getId()?>"><?=Text::getText("Permissions")?></a>&nbsp;</td>
           </tr>
         <? } ?>
       </table>
     <?
 }
开发者ID:elecnix,项目名称:resaccman,代码行数:28,代码来源:GroupList.php

示例3: printContent

 function printContent() {
   $action = $this->getAction();
   ?>
     <form method="POST" action="<?=$action?>">
         <input type="hidden" name="action" value="save">
         <input type="hidden" name="submitted" value="yes">
         <table border="0" cellpadding="2">
             <tr>
                 <th><?=Text::getText("LoginName")?></th>
                 <td><input type="text" name="loginName" value=""></td>
             </tr>
             <tr>
                 <th><?=Text::getText("FullName")?></th>
                 <td><input type="text" name="fullName" value=""></td>
             </tr>
             <tr>
                 <th><?=Text::getText("Password")?></th>
                 <td><input type="password" name="password" value=""></td>
             </tr>
             <tr>
                 <td colspan="2" align="center">
                     <input type="submit" value="<?=Text::getText("Add")?>">
                 </td>
             </tr>
         </table>
     </form>
   <?
 }
开发者ID:elecnix,项目名称:resaccman,代码行数:28,代码来源:UserAddForm.php

示例4: printContent

 function printContent() {
   ?>
     <table border="0">
       <tr bgcolor="<?=BGCOLOR_ALT?>">
         <th>#</th>
         <? if (SecurityUser::havePermission("DELETE")) { ?>
           <th></th>
         <? } ?>
         <th><?=Text::getText("FullName")?></th>
         <th><?=Text::getText("LoginName")?></th>
       </tr>
       <? $bg = TRUE; ?>
       <? foreach ($this->users as $u) { ?>
         <? $bg = !$bg; ?>
         <tr<? if ($bg) { ?> bgcolor="<?=BGCOLOR_ALT?>"<? } ?>>
           <td>&nbsp;<?=$u->getId()?>&nbsp;</td>
             <? if (SecurityUser::havePermission("DELETE")) { ?>
               <td><a href="<?=$this->userDeletePage?>?<?=$this->userDeleteUserParam?>=<?=$u->getId()?>" onClick="return confirm('<?=Text::getText('ConfirmDeleteUser')?>\n\n<?=$u->getLoginName()?>')"><img src="<?=IMAGE_TRASH?>" border="0" alt="<?=Text::getText('Delete')?>"></a></td>
             <? } ?>
             <td>&nbsp;<?=$u->getFullName()?>&nbsp;</td>
             <td>&nbsp;<a href="<?=$this->getUserPage()?>?id=<?=$u->getId()?>"><?=$u->getLoginName()?></a>&nbsp;</td>
         </tr>
       <? } ?>
     </table>
   <?
 }
开发者ID:elecnix,项目名称:resaccman,代码行数:26,代码来源:UserList.php

示例5: getSubmitCaption

 /**
  * 
  */
 function getSubmitCaption()
 {
     if ($this->submitCaption == NULL) {
         return Text::getText("Submit");
     } else {
         return $this->submitCaption;
     }
 }
开发者ID:elecnix,项目名称:resaccman,代码行数:11,代码来源:Form.php

示例6: insert

 /**
  * Takes an INSERT query and returns the inserted ID,
  * or 0 if query does not generate an AUTO_INCREMENT
  * value.
  */
 function insert($sql) {
     $con = Database::getConnection();
     $result = mysql_query($sql) or die(Database::formatError($sql, Text::getText("QueryFailed")));
     $record = new DatabaseRecord($result);
     $id =  mysql_insert_id($con);
     Database::returnConnection($con);
     return $id;
 }
开发者ID:elecnix,项目名称:smellyfish,代码行数:13,代码来源:Database.php

示例7: testConstruct_returnsElement_ifTextIsString

 /**
  * __construct() should return text element if text is string
  */
 public function testConstruct_returnsElement_ifTextIsString()
 {
     $string = 'foo';
     $text = new Text($string);
     $this->assertTrue($text instanceof Text);
     $this->assertEquals($string, $text->getText());
     return;
 }
开发者ID:jstewmc,项目名称:rtf,代码行数:11,代码来源:TextTest.php

示例8: testFormattedTextRetrieve

 public function testFormattedTextRetrieve()
 {
     $string = "Hey %s, you have %d new messages";
     $arg1 = "Joe";
     $arg2 = 15;
     $compare = "Hey Joe, you have 15 new messages";
     $retrieved = Text::getText($string, $arg1, $arg2);
     self::assertSame($compare, (string) $retrieved);
 }
开发者ID:apexstudios,项目名称:yamwlib,代码行数:9,代码来源:TextTest.php

示例9: writeText

 protected function writeText(Text $textChild, $level)
 {
     $newLine = $this->_pretty ? $this->_newLine : '';
     $indent = $this->_pretty ? str_repeat($this->_tabString, $level) : '';
     $text = $textChild->getText();
     //TODO: Need some kind of mb_wordwrap here, maybe:
     //http://stackoverflow.com/questions/3825226/multi-byte-safe-wordwrap-function-for-utf-8?
     return $this->_pretty && mb_strlen($text, 'utf-8') > $this->_textWrap ? $indent . wordwrap(str_replace("\n", '', $text), $this->_textWrap, "{$newLine}{$indent}") : $text;
 }
开发者ID:talesoft,项目名称:tale-framework,代码行数:9,代码来源:Writer.php

示例10: update

 function update() {
     SecurityGroup::requirePermission("CHANGE");
     if ($this->id == NULL) {
         die(Text::getText("GroupHasNoId"));
     }
     $query = "UPDATE security_group";
     $query .= " SET name=".Database::sqlValue($this->name);
     $query .= " WHERE id=".Database::sqlValue($this->id);
     Database::query($query);
 }
开发者ID:elecnix,项目名称:smellyfish,代码行数:10,代码来源:SecurityGroup.php

示例11: printContent

 function printContent() {
     $u = $this->getUser();
     ?>
       <form method="POST">
           <input type="hidden" name="action" value="save">
           <table border="0" cellpadding="2">
               <tr>
                   <td colspan="2" align="center">
                       <?=Text::getText("UserInfo")?>
                   </td>
               </tr>
               <tr>
                   <th><?=Text::getText("LoginName")?></th>
                   <td><input type="text" name="loginName" value="<?=$u->getLoginName()?>"></td>
               </tr>
               <tr>
                   <th><?=Text::getText("FullName")?></th>
                   <td><input type="text" name="fullName" value="<?=$u->getFullName()?>"></td>
               </tr>
               <tr>
                   <td colspan="2" align="center">
                       &nbsp;
                   </td>
               </tr>
               <tr>
                   <td colspan="2" align="center">
                       <input type="checkbox" name="changePassword" value="true">
                       <?=Text::getText("ChangePassword")?>
                   </td>
               </tr>
               <tr>
                   <th><?=Text::getText("NewPassword")?></th>
                   <td><input type="password" name="password" value=""></td>
               </tr>
               <tr>
                   <td colspan="2" align="center">
                       <input type="submit" value="<?=$this->getSubmitCaption()?>">
                       &nbsp;
                       <input type="button" value="<?=Text::getText('Cancel')?>" onClick="document.location='<?=$this->cancelPage?>'">
                   </td>
               </tr>
           </table>
       </form>
     <?
 }
开发者ID:elecnix,项目名称:resaccman,代码行数:45,代码来源:UserEditForm.php

示例12: printContent

 function printContent() {
     ?>
       <form method="POST" action="<?=$this->getAction()?>">
           <input type="hidden" name="action" value="save">
           <table border="0" cellpadding="2">
               <tr>
                   <th><?=Text::getText("Name")?></th>
                   <td><input type="text" name="name" value=""></td>
               </tr>
               <tr>
                   <td colspan="2" align="center">
                       <input type="submit" value="<?=Text::getText("Add")?>">
                   </td>
               </tr>
           </table>
       </form>
     <?
 }
开发者ID:elecnix,项目名称:resaccman,代码行数:18,代码来源:GroupAddForm.php

示例13: printContent

 function printContent() {
     $g = $this->group;
     ?>    
       <form action="<?=$this->getAction()?>" method="POST">
           <input type="hidden" name="action" value="save">
           <table border="0" cellpadding="2">
               <tr>
                   <th><?=Text::getText("Name")?></th>
                   <td><input type="text" name="name" value="<?=$g->getName()?>"></td>
               </tr>
               <tr>
                   <td colspan="2" align="center">
                       <input type="submit" value="<?=Text::getText('Save')?>">
                       &nbsp;
                       <input type="button" value="<?=Text::getText('Cancel')?>" onClick="document.location='<?=$this->cancelPage?>'">
                   </td>
               </tr>
           </table>
       </form>
     <?
 }
开发者ID:elecnix,项目名称:resaccman,代码行数:21,代码来源:GroupEditForm.php

示例14: printContent

 function printContent() {
     $g = $this->getGroup();
     $allPermissions = SecurityPermission::getAll();
     $allResources = SecurityResource::getAll();
     $msg = $this->getMessage();
     ?>
       <form action="<?=$this->getAction()?>" method="post">
         <input type="hidden" name="group" value="<?=$g->getId()?>">
         <? if (strlen($msg) > 0) { ?>
           <p><b><?=$msg?></b></p>
         <? } ?>
         <p>
         <table border="0">
           <tr>
             <td>
               <table border="0">
                 <tr bgcolor="<?=BGCOLOR_ALT?>">
                   <th><?=Text::getText("Resource")?></th>
                   <? foreach ($allPermissions as $perm) { ?>
                     <th><?=$perm->getName()?></th>
                   <? } ?>
                 </tr>
                 <? $bg = TRUE; ?>
                 <? foreach ($allResources as $res) { ?>
                   <? $bg = !$bg; ?>
                   <tr<? if ($bg) { ?> bgcolor="<?=BGCOLOR_ALT?>"<? } ?>>
                     <td><?=$res->getName()?></td>
                     <? foreach ($allPermissions as $perm) { ?>
                       <?
                         $checked = "";
                         if ($g->hasPermission($res, $perm)) {
                             $checked = " checked";
                         }
                       ?>
                       <td align="center"><input type="checkbox"<?=$checked?> name="res<?=$res->getId()?>_perm<?=$perm->getId()?>"></td>
                     <? } ?>
                   </tr>
                 <? } ?>
               </table>
             </td>
           </tr>
           <tr>
             <td align="center">
               <input type="submit" value="<?=Text::getText("Save")?>">
             </td>
           </tr>
         </table>
         </p>
       </form>
     <?
 }
开发者ID:elecnix,项目名称:resaccman,代码行数:51,代码来源:GroupPermissionsForm.php

示例15:

</h2>

<form method="POST">
    <input type="hidden" name="action" value="save">
    <table border="0" cellpadding="2">
        <tr>
            <th><?php 
echo Text::getText("Name");
?>
</th>
            <td><input type="text" name="name" value="<?php 
echo $g->getName();
?>
"></td>
        </tr>
        <tr>
            <td colspan="2" align="center">
                <input type="submit" value="<?php 
echo Text::getText("Save");
?>
">
                &nbsp;
                <input type="button" value="<?php 
echo Text::getText("Cancel");
?>
" onClick="document.location='groups.php'">
            </td>
        </tr>
    </table>
</form>
开发者ID:elecnix,项目名称:smellyfish,代码行数:30,代码来源:groupEditForm.php


注:本文中的Text::getText方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。