Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8532625
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T09:45:28+00:00 2026-06-11T09:45:28+00:00

I want to write an Extbase Backend module which needs a list of all

  • 0

I want to write an Extbase Backend module which needs a list of all Objects generated from tt_content with CType = ‘image’.

Now I started defining a simple model

class Tx_Myextension_Domain_Model_Content extends Tx_Extbase_DomainObject_AbstractEntity
{

    /**
     * @var string
     */
    protected $header;

    /**
     * @return the $header
     */
    public function getHeader()
    {
        return $this->header;
    }

    /**
     * @param string $header
     */
    public function setHeader($header)
    {
        $this->header = $header;
    }

}

and a Repository

class Tx_Myextension_Domain_Repository_ContentRepository extends Tx_Extbase_Persistence_Repository
{

    public function initializeObject()
    {
        $querySettings = $this->objectManager->create('Tx_Extbase_Persistence_Typo3QuerySettings');
        $querySettings->setRespectStoragePage(FALSE);
        $this->setDefaultQuerySettings($querySettings);
    }
}

As far as I know the initializeObject method is a way to get all content elements, no matter which pid they have.

At last I tried to map my Content Class on tt_content:

plugin.tx_myextension {
  persistence {
    classes {
      Tx_Myextension_Domain_Model_Content {
        mapping {
          tableName = tt_content
          recordType = Tx_Myextension_Domain_Model_Content
          columns {
            header.mapOnProperty = header
          }
        }
      }
    }
  }
}

module.tx_myextension {
    persistence < plugin.tx_myextension.persistence
}

No I want to use the Repo. e.g. countAll. Unfortunately it always returns 0. Looking for the MySQL query discovers the problem:

SELECT COUNT(*) 
FROM tt_content  
WHERE (tt_content.CType='Tx_Myextension_Domain_Model_Content') 
  AND tt_content.deleted=0 AND tt_content.hidden=0 
  AND (tt_content.starttime<=1313073660) 
  AND (tt_content.endtime=0 OR tt_content.endtime>1313073660) 
  AND tt_content.sys_language_uid IN (0,-1) 
  AND tt_content.pid IN (0)

Typo 3 or Extbase or something different added all these where clauses to the query. I just want to get rid of the CType and pid clauses. As I said, I thought that the method used in the Repo leads to ignoring the pid, which is obviously not the case.

Can somebody help me? All I want is an array of Image Content Elements. Thank you in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T09:45:29+00:00Added an answer on June 11, 2026 at 9:45 am

    Late answer: You’ll most likely want to call

    query->getQuerySettings()
        ->setRespectEnableFields(FALSE)
        ->setRespectSysLanguage(FALSE);
    

    for your query. You can disable it for all queries in your repository’s initializeObject method:

    $querySettings = $this->objectManager->create('Tx_Extbase_Persistence_Typo3QuerySettings');
    $querySettings
        ->setRespectStoragePage(FALSE)
        ->setRespectEnableFields(FALSE)
        ->setRespectSysLanguage(FALSE);
    $this->setDefaultQuerySettings($querySettings);
    

    See: TYPO 3 API docs

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want write a simple query which will fetch data from a table (which
I want write a little code analyzer which parses nested structures and translates into
suppose we have two numbers i want write program which print common bits subsequent
I want to write method to send SMS on number and with text from
I want write this sql select statment in mysql v 3.23 select * from
I have sql select for which I want write criteria. I was googling some
I want write an win-form application to convert data from foxpro table into sql
I want write this query in SQL Server from ( select DISTINCT salary from
I have List (Of Report). Report has 90 properties. I dont want write them
Want to write an auto-answering (GSM call) program around a gsm voice modem which

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.