Version 5.0.0 beta 10
This commit is contained in:
1 parent
56979f8ee8
commit
264eeb97e0
325 files changed
+6442
-1849
No files matched your search
@@ -150,14 +150,18 @@ class CustomField extends SystemCustomField
|
||||
parent::form( $form );
|
||||
|
||||
$packages = array();
|
||||
foreach ( array_filter( explode( ',', $this->packages ) ) as $id )
|
||||
if( $this->packages )
|
||||
{
|
||||
try
|
||||
foreach ( array_filter( explode( ',', $this->packages ) ) as $id )
|
||||
{
|
||||
$packages[] = Package::load( $id );
|
||||
try
|
||||
{
|
||||
$packages[] = Package::load( $id );
|
||||
}
|
||||
catch ( OutOfRangeException ) { }
|
||||
}
|
||||
catch ( OutOfRangeException ) { }
|
||||
}
|
||||
|
||||
$form->add( new Node( 'cf_packages', $packages, FALSE, array( 'class' => 'IPS\nexus\Package\Group', 'noParentNodes' => 'custom_packages', 'multiple' => TRUE, 'permissionCheck' => function( $node )
|
||||
{
|
||||
return !( $node instanceof Group);
|
||||
|
||||
Reference in new issue
Block a user