function __construct( $row ) { parent::__construct( $row ); $condition = array( 'id' => $this->attribute('taxonomy_category_id'), ); $this->taxonomyCategory = TaxonomyCategory::fetchObject( TaxonomyCategory::definition(), null, $condition ); }
public static function count( $def, $conds = null, $field = null ) { if ( !isset( $field ) ) { $field = '*'; } $customFields = array( array( 'operation' => 'COUNT( ' . $field . ' )', 'name' => 'row_count' ) ); $rows = MMPersistentObject::fetchObjectList( $def, array(), $conds, array(), null, false, false, $customFields ); return $rows[0]['row_count']; }
function __construct( $row ) { parent::__construct( $row ); $this->configurations = ChannelBlockConfiguration::getConfigurationsByBlock( $this->attribute("id") ); $templateObject = ChannelTemplate::getTemplateById( $this->attribute("template_id") ); if( $templateObject ) { $this->template = $templateObject->attribute("template_web"); if( ContextTool::instance()->isMobile() && $templateObject->attribute("template_mobile") ) { $this->template = $templateObject->attribute("template_mobile"); } } }
/** * @param int $applicationId * @return array[] */ public static function fetchAllowedUsersByApplication($applicationId) { $appLocalized = CacheApplicationTool::buildLocalizedApplicationByApplication($applicationId); $conditions = array( 'application_localized_id' => $appLocalized->id, ); $result = parent::fetchObjectList(self::definition(), null, $conditions, null, null, false ); $usersList = array(); foreach( $result as $row ) { if ( !empty($row) ) { $usersList[] = $row['user_uuid']; } } return $usersList; }
/** * @param array $row */ function __construct( $row = array() ) { parent::__construct( $row ); }
function __construct( $row ) { parent::__construct( $row ); $this->buildFeature(); }
function __construct( $row ) { parent::__construct( $row ); }
/** * @return array */ public static function fetchPendingList() { return MMPersistentObject::fetchObjectList( self::definition(), null, null, array('created_at' => 'asc'), null, true, false, null, null, ' WHERE updated_at IS NULL' ); }
/** * @param array $conditions * @return ApplicationObject[] */ public static function fetchApplicationList ( $conditions = array() ) { if( is_null(self::$_applicationList ) ) { $appIds = parent::fetchObjectList(ApplicationObject::definition(), null, $conditions, null, null, false ); $apps = array(); foreach( $appIds as $appId ) { $appLocalized = CacheApplicationTool::buildLocalizedApplicationByApplication($appId['id']); if ( $appLocalized instanceof ApplicationLocalized && $appLocalized->applicationObject instanceof ApplicationObject ) $apps[] = $appLocalized->applicationObject; } self::$_applicationList = $apps; } return self::$_applicationList; }
function __construct( $row ) { parent::__construct( $row ); $this->initPublisherFolderTranslation(); }
function __construct( $row ) { parent::__construct( $row ); $this->buildApplication(); }
static function hasSpeciality($applicationidentifier) { $conds = array( "cluster_identifier" => ClusterTool::clusterIdentifier(), "application_identifier" => $applicationidentifier, "speciality" => array("!=", "") ); return parent::count(self::definition(), $conds) >= 1; }