本文整理汇总了PHP中Gdn_Module::ToString方法的典型用法代码示例。如果您正苦于以下问题:PHP Gdn_Module::ToString方法的具体用法?PHP Gdn_Module::ToString怎么用?PHP Gdn_Module::ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Gdn_Module
的用法示例。
在下文中一共展示了Gdn_Module::ToString方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: ToString
public function ToString()
{
if (!Gdn::Session()->IsValid() && C('Garden.Modules.ShowGuestModule')) {
return parent::ToString();
}
return '';
}
示例2: ToString
public function ToString()
{
if (is_object($this->User)) {
return parent::ToString();
}
return '';
}
示例3: toString
public function toString()
{
if (Gdn::session()->isValid()) {
return parent::ToString();
}
return '';
}
示例4: ToString
public function ToString()
{
if (!Gdn::Session()->IsValid()) {
return parent::ToString();
}
return '';
}
示例5: toString
public function toString()
{
if (is_object($this->Data) && $this->Data->numRows() > 0) {
return parent::ToString();
}
return '';
}
示例6: toString
public function toString()
{
if (!$this->data('DiscussionEvents')) {
$this->getData($this->Limit);
}
return parent::ToString();
}
示例7: ToString
public function ToString()
{
$Session = Gdn::Session();
$Controller = Gdn::Controller();
$UserID = $Controller->User->UserID;
$MemberOptions = array();
$ProfileOptions = array();
$Controller->EventArguments['UserID'] = $UserID;
$Controller->EventArguments['ProfileOptions'] =& $ProfileOptions;
$Controller->EventArguments['MemberOptions'] =& $MemberOptions;
if ($Controller->EditMode) {
return '<div class="ProfileOptions">' . Anchor(T('Back to Profile'), UserUrl($Controller->User), array('class' => 'ProfileButtons')) . '</div>';
// $ProfileOptions[] = array('Text' => T('Back to Profile'), 'Url' => UserUrl($Controller->User), 'CssClass' => 'BackToProfile');
} else {
// Profile Editing
if (hasEditProfile($Controller->User->UserID)) {
$ProfileOptions[] = array('Text' => Sprite('SpEditProfile') . ' ' . T('Edit Profile'), 'Url' => UserUrl($Controller->User, '', 'edit'));
}
// Ban/Unban
$MayBan = CheckPermission('Garden.Moderation.Manage') || CheckPermission('Garden.Users.Edit') || CheckPermission('Moderation.Users.Ban');
if ($MayBan && $UserID != $Session->UserID) {
if ($Controller->User->Banned) {
$ProfileOptions[] = array('Text' => Sprite('SpBan') . ' ' . T('Unban'), 'Url' => "/user/ban?userid={$UserID}&unban=1", 'CssClass' => 'Popup');
} elseif (!$Controller->User->Admin) {
$ProfileOptions[] = array('Text' => Sprite('SpBan') . ' ' . T('Ban'), 'Url' => "/user/ban?userid={$UserID}", 'CssClass' => 'Popup');
}
}
// Delete content.
if (CheckPermission('Garden.Moderation.Manage')) {
$ProfileOptions[] = array('Text' => Sprite('SpDelete') . ' ' . T('Delete Content'), 'Url' => "/user/deletecontent?userid={$UserID}", 'CssClass' => 'Popup');
}
}
return parent::ToString();
}
示例8: toString
public function toString()
{
$Form = $this->_Sender->Form;
$this->_Sender->addJsFile('condition.js');
if ($Form->authenticatedPostBack()) {
// Grab the conditions from the form and convert them to the conditions array.
$this->Conditions($this->_FromForm());
} else {
}
$this->Types = array_merge(array('' => '(' . sprintf(t('Select a %s'), t('Condition Type', 'Type')) . ')'), Gdn_Condition::AllTypes());
//die(print_r($this->Types));
// Get all of the permissions that are valid for the permissions dropdown.
$PermissionModel = new PermissionModel();
$Permissions = $PermissionModel->GetGlobalPermissions(0);
$Permissions = array_keys($Permissions);
sort($Permissions);
$Permissions = array_combine($Permissions, $Permissions);
$Permissions = array_merge(array('' => '(' . sprintf(t('Select a %s'), t('Permission')) . ')'), $Permissions);
$this->Permissions = $Permissions;
// Get all of the roles.
$RoleModel = new RoleModel();
$Roles = $RoleModel->getArray();
$Roles = array_merge(array('-' => '(' . sprintf(t('Select a %s'), t('Role')) . ')'), $Roles);
$this->Roles = $Roles;
$this->Form = $Form;
return parent::ToString();
}
示例9: ToString
public function ToString()
{
if (Gdn::Config('Vanilla.Categories.Use') == TRUE) {
return parent::ToString();
}
return '';
}
示例10: ToString
public function ToString()
{
if ($this->_ActivityData !== FALSE && $this->_ActivityData->NumRows() > 0) {
return parent::ToString();
}
return '';
}
示例11: ToString
public function ToString()
{
if ($this->Data) {
return parent::ToString();
}
return '';
}
示例12: ToString
public function ToString()
{
if (is_object($this->Conversation) && $this->Conversation->ConversationID > 0) {
return parent::ToString();
}
return '';
}
示例13: toString
public function toString()
{
if (is_array($this->ModeratorData) && count($this->ModeratorData) > 0 && is_array($this->ModeratorData[0]->Moderators) && count($this->ModeratorData[0]->Moderators) > 0) {
return parent::ToString();
}
return '';
}
示例14: ToString
public function ToString()
{
$String = '';
if ($this->CheckPermission()) {
$String = parent::ToString();
}
return $String;
}
示例15: toString
public function toString()
{
if (!$this->Data) {
$this->GetData();
}
$this->filterDepth($this->Data->result(), $this->startDepth, $this->endDepth);
return parent::ToString();
}