33 $this->
init(
'oxnews');
49 if ($this->oxnews__oxdate) {
50 $this->oxnews__oxdate->setValue(
oxRegistry::get(
"oxUtilsDate")->formatDBDate( $this->oxnews__oxdate->value ) );
61 if ( $this->_oGroups == null && $sOxid = $this->
getId() ) {
63 $this->_oGroups =
oxNew(
'oxlist',
'oxgroups' );
65 $sSelect =
"select {$sViewName}.* from {$sViewName}, oxobject2group ";
66 $sSelect .=
"where oxobject2group.oxobjectid='$sOxid' ";
67 $sSelect .=
"and oxobject2group.oxgroupsid={$sViewName}.oxid ";
68 $this->_oGroups->selectString( $sSelect );
85 foreach ( $aGroups as $oObject ) {
86 if ( $oObject->_sOXID == $sGroupID ) {
101 public function delete( $sOxid = null )
104 $sOxid = $this->
getId();
110 if ( $blDelete = parent::delete( $sOxid ) ) {
112 $oDb->execute(
"delete from oxobject2group where oxobject2group.oxobjectid = ".$oDb->quote( $sOxid ) );
126 $this->oxnews__oxdate->setValue(
oxRegistry::get(
"oxUtilsDate")->formatDBDate( $this->oxnews__oxdate->value,
true ) );
139 if ( !$this->oxnews__oxdate ||
oxRegistry::get(
"oxUtilsDate")->isEmptyDate( $this->oxnews__oxdate->value ) ) {
141 $this->oxnews__oxdate =
new oxField( date(
'Y-m-d' ) );
143 $this->oxnews__oxdate =
new oxField(
oxRegistry::get(
"oxUtilsDate")->formatDBDate( $this->oxnews__oxdate->value,
true ) );
161 switch (strtolower($sFieldName)) {
163 case 'oxnews__oxlongdesc':
179 return $oUtilsView->parseThroughSmarty( $this->oxnews__oxlongdesc->getRawValue(), $this->
getId().$this->getLanguage(), null, true );