Version 5.0.6
This commit is contained in:
1 parent
a3a4a9ccbd
commit
b89858b2ff
1214 files changed
+92828
-14859
No files matched your search
@@ -14,6 +14,7 @@ namespace IPS\Extensions;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
|
||||
use IPS\Application\BuilderFilter;
|
||||
use RuntimeException;
|
||||
|
||||
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
@@ -32,10 +33,20 @@ abstract class BuildAbstract
|
||||
*/
|
||||
abstract public function build() : void;
|
||||
|
||||
/**
|
||||
* Should the current file/directory be included in the tar
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function accept( BuilderFilter $current ): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Finish Build
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
abstract protected function finish() : void;
|
||||
abstract public function finish() : void;
|
||||
}
|
||||
@@ -13,7 +13,11 @@
|
||||
namespace IPS\Extensions;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
|
||||
use IPS\Helpers\Menu\Buttons;
|
||||
use IPS\Helpers\Menu\MenuItem;
|
||||
use IPS\Member\Club;
|
||||
use IPS\Member\Club\Page as ClubPage;
|
||||
use IPS\Node\Model;
|
||||
|
||||
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
@@ -31,5 +35,34 @@ abstract class ClubAbstract
|
||||
* @param Model|null $container Container
|
||||
* @return array
|
||||
*/
|
||||
abstract public function tabs( Club $club, ?Model $container = NULL ): array;
|
||||
public function tabs( Club $club, ?Model $container = NULL ): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Return an array of menu elements to add to the club menu
|
||||
*
|
||||
* @param Club $club
|
||||
* @param Model|ClubPage|null $container
|
||||
* @return array<string,MenuItem>
|
||||
*/
|
||||
public function menu( Club $club, Model|ClubPage|null $container = null ) : array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Return an array of menu elements to add to the buttons list
|
||||
* in the club header. The menu will be rendered as individual buttons and not
|
||||
* as a dropdown menu.
|
||||
*
|
||||
* @see Buttons::button()
|
||||
* @param Club $club
|
||||
* @return array
|
||||
*/
|
||||
public function buttons( Club $club ) : array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
}
|
||||
@@ -13,6 +13,10 @@
|
||||
namespace IPS\Extensions;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
|
||||
use IPS\Member;
|
||||
use IPS\Theme;
|
||||
|
||||
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( $_SERVER['SERVER_PROTOCOL'] ?? 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
@@ -45,4 +49,17 @@ abstract class MemberHistoryAbstract
|
||||
* @return string
|
||||
*/
|
||||
abstract public function parseLogData( string $value, array $row ): string;
|
||||
|
||||
/**
|
||||
* Parse LogMember column
|
||||
*
|
||||
* @param string $value column value
|
||||
* @param array $row entire log row
|
||||
* @return string
|
||||
*/
|
||||
public function parseLogMember( string $value, array $row ): string
|
||||
{
|
||||
$member = Member::load( $value );
|
||||
return Theme::i()->getTemplate( 'global', 'core' )->userPhoto( $member, 'tiny' ) . ' ' . $member->link();
|
||||
}
|
||||
}
|
||||
@@ -42,4 +42,18 @@ abstract class ModCpAbstract
|
||||
* @return void
|
||||
*/
|
||||
abstract public function manage() : void;
|
||||
|
||||
/**
|
||||
* Any counters that will be displayed in the ModCP Header.
|
||||
* This should return an array of counters, where each item contains
|
||||
* title (a language string)
|
||||
* total
|
||||
* id (optional element ID)
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getCounters() : array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
}
|
||||
@@ -14,6 +14,7 @@ namespace IPS\Extensions;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
|
||||
use IPS\Http\Url;
|
||||
use IPS\Member;
|
||||
|
||||
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
@@ -40,6 +41,20 @@ abstract class ProfileAbstract
|
||||
$this->member = $member;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Url
|
||||
*/
|
||||
public function url() : Url
|
||||
{
|
||||
$className = explode( "\\", get_class( $this ) );
|
||||
return Url::internal(
|
||||
"app=core&module=members&controller=profile&id=" . $this->member->member_id . "&tab=" . mb_strtolower( array_pop( $className ) ),
|
||||
"front",
|
||||
"profile_tab",
|
||||
$this->member->members_seo_name
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Is there content to display?
|
||||
*
|
||||
|
||||
Reference in new issue
Block a user