Version 5.0.6
This commit is contained in:
1 parent
a3a4a9ccbd
commit
b89858b2ff
1214 files changed
+92828
-14859
No files matched your search
@@ -231,7 +231,7 @@ class Item extends ContentItem implements Embeddable
|
||||
* @param array $where Where clause
|
||||
* @param string|null $order MySQL ORDER BY clause (NULL to order by date)
|
||||
* @param int|array|null $limit Limit clause
|
||||
* @param string $permissionKey A key which has a value in the permission map (either of the container or of this class) matching a column ID in core_permission_index or NULL to ignore permissions
|
||||
* @param string|null $permissionKey A key which has a value in the permission map (either of the container or of this class) matching a column ID in core_permission_index or NULL to ignore permissions
|
||||
* @param int|bool|null $includeHiddenItems Include hidden items? NULL to detect if currently logged in member has permission, -1 to return public content only, TRUE to return unapproved content and FALSE to only return unapproved content the viewing member submitted
|
||||
* @param int $queryFlags Select bitwise flags
|
||||
* @param Member|null $member The member (NULL to use currently logged in member)
|
||||
@@ -248,7 +248,7 @@ class Item extends ContentItem implements Embeddable
|
||||
* @param array|null $location Array of item lat and long
|
||||
* @return ActiveRecordIterator|int
|
||||
*/
|
||||
public static function getItemsWithPermission( array $where=array(), string $order=NULL, int|array|null $limit=10, string $permissionKey='read', int|bool|null $includeHiddenItems= Filter::FILTER_AUTOMATIC, int $queryFlags=0, ?Member $member=null, bool $joinContainer=FALSE, bool $joinComments=FALSE, bool $joinReviews=FALSE, bool $countOnly=FALSE, array|null $joins=null, bool|Model $skipPermission=FALSE, bool $joinTags=TRUE, bool $joinAuthor=TRUE, bool $joinLastCommenter=TRUE, bool $showMovedLinks=FALSE, array|null $location=null ): ActiveRecordIterator|int
|
||||
public static function getItemsWithPermission( array $where=array(), string $order=NULL, int|array|null $limit=10, ?string $permissionKey='read', int|bool|null $includeHiddenItems= Filter::FILTER_AUTOMATIC, int $queryFlags=0, ?Member $member=null, bool $joinContainer=FALSE, bool $joinComments=FALSE, bool $joinReviews=FALSE, bool $countOnly=FALSE, array|null $joins=null, bool|Model $skipPermission=FALSE, bool $joinTags=TRUE, bool $joinAuthor=TRUE, bool $joinLastCommenter=TRUE, bool $showMovedLinks=FALSE, array|null $location=null ): ActiveRecordIterator|int
|
||||
{
|
||||
$member = $member ?: Member::loggedIn();
|
||||
|
||||
|
||||
@@ -148,10 +148,17 @@ class Package extends Model
|
||||
*/
|
||||
public static function packageTypes() : array
|
||||
{
|
||||
return array(
|
||||
$return = array(
|
||||
'Product' => 'IPS\nexus\Package\Product',
|
||||
'Ad' => 'IPS\nexus\Package\Ad'
|
||||
);
|
||||
|
||||
foreach( Application::allExtensions( 'nexus', 'PackageType', null, null, null, false ) as $key => $ext )
|
||||
{
|
||||
$return[ $key ] = $ext;
|
||||
}
|
||||
|
||||
return $return;
|
||||
}
|
||||
|
||||
/* !ActiveRecord */
|
||||
@@ -621,7 +628,7 @@ class Package extends Model
|
||||
catch ( OutOfRangeException ) { }
|
||||
}
|
||||
|
||||
return static::lowestPriceFromData( $customer, $currency, $this->id, json_decode( $this->base_price, TRUE ), json_decode( $this->discounts, TRUE ), $renewOptions, $this->stock, $tax, $priceMayChange, $priceNotIncludingDiscounts, $relevantRenewalTerm );
|
||||
return static::lowestPriceFromData( $customer, $currency, $this->id, json_decode( $this->base_price, TRUE ), ( $this->discounts ? json_decode( $this->discounts, TRUE ) : [] ), $renewOptions, $this->stock, $tax, $priceMayChange, $priceNotIncludingDiscounts, $relevantRenewalTerm );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1105,7 +1112,7 @@ class Package extends Model
|
||||
);
|
||||
}
|
||||
|
||||
return NULL;
|
||||
return parent::get__badge();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1330,7 +1337,9 @@ class Package extends Model
|
||||
|
||||
$form->addHeader( 'package_renewals' );
|
||||
$form->add( new YesNo( 'p_renews', !empty( $renewOptions ), FALSE, array( 'togglesOn' => array( 'p_initial_term', 'p_renew_options', 'p_grace_period', 'p_renew', ( $this->id ? "form_{$this->id}" : 'form_new' ) . '_header_package_client_area_renewals', 'p_email_expire_soon_type', 'p_email_expire_type' ) ), NULL, NULL, NULL, 'p_renews' ) );
|
||||
$form->add( new \IPS\nexus\Form\RenewalTerm( 'p_initial_term', $this->initial_term ?: NULL, FALSE, array( 'initialTerm' => TRUE, 'initialTermLang' => 'term_same_as_renewal', 'lockPrice' => TRUE ), NULL, NULL, NULL, 'p_initial_term' ) );
|
||||
|
||||
/* The price is ignored on this field anyway, so we can hard-code to $0 */
|
||||
$form->add( new \IPS\nexus\Form\RenewalTerm( 'p_initial_term', $this->initial_term ? new RenewalTerm( new Money( "0", "USD" ), new DateInterval( "P" . $this->initial_term ) ) : NULL, FALSE, array( 'initialTerm' => TRUE, 'initialTermLang' => 'term_same_as_renewal', 'lockPrice' => TRUE ), NULL, NULL, NULL, 'p_initial_term' ) );
|
||||
$form->add( new Stack( 'p_renew_options', $renewOptions, FALSE, array(
|
||||
'stackFieldType' => 'IPS\nexus\Form\RenewalTerm',
|
||||
'allCurrencies' => TRUE,
|
||||
|
||||
Reference in new issue
Block a user