ResourceQuery
class ResourceQuery extends ModelCriteria
Base class that represents a query for the 'resource' table.
Methods
Initializes internal state of \Thelia\Model\Base\ResourceQuery object.
Returns a new ChildResourceQuery object.
Find object by primary key.
Find objects by primary key
$objs = $c->findPks(array(12, 56, 832), $con);
Filter the query by primary key
Filter the query by a list of primary keys
Filter the query on the id column
Filter the query on the code column
Filter the query on the created_at column
Filter the query on the updated_at column
Filter the query by a related \Thelia\Model\ProfileResource object
Adds a JOIN clause to the query using the ProfileResource relation
Use the ProfileResource relation ProfileResource object
Filter the query by a related \Thelia\Model\ResourceI18n object
Adds a JOIN clause to the query using the ResourceI18n relation
Use the ResourceI18n relation ResourceI18n object
Filter the query by a related Profile object using the profile_resource table as cross reference
Deletes all rows from the resource table.
Performs a DELETE on the database, given a ChildResource or Criteria object OR a primary key value.
Filter by the latest updated
Filter by the latest created
Order by update date desc
Order by update date asc
Order by create date desc
Order by create date asc
Adds a JOIN clause to the query using the i18n relation
Adds a JOIN clause to the query and hydrates the related I18n object.
Use the I18n relation query object
Order by the id column
Order by the code column
Order by the created_at column
Order by the updated_at column
Group by the id column
Group by the code column
Group by the created_at column
Group by the updated_at column
Adds a LEFT JOIN clause to the query
Adds a RIGHT JOIN clause to the query
Adds a INNER JOIN clause to the query
Adds a LEFT JOIN clause to the query using the ProfileResource relation
Adds a RIGHT JOIN clause to the query using the ProfileResource relation
Adds a INNER JOIN clause to the query using the ProfileResource relation
Adds a LEFT JOIN clause to the query using the ResourceI18n relation
Adds a RIGHT JOIN clause to the query using the ResourceI18n relation
Adds a INNER JOIN clause to the query using the ResourceI18n relation
Return the first ChildResource matching the query
Return the first ChildResource matching the query, or a new ChildResource object populated from the query conditions when no match is found
Return the first ChildResource filtered by the id column
Return the first ChildResource filtered by the code column
Return the first ChildResource filtered by the created_at column
Return the first ChildResource filtered by the updated_at column
Return ChildResource objects filtered by the id column
Return ChildResource objects filtered by the code column
Return ChildResource objects filtered by the created_at column
Return ChildResource objects filtered by the updated_at column
Details
at line 71
__construct(
string $dbName = 'thelia',
string $modelName = '\\Thelia\\Model\\Resource',
string $modelAlias = null)
Initializes internal state of \Thelia\Model\Base\ResourceQuery object.
at line 84
static
ResourceQuery
create(
string $modelAlias = null,
Criteria $criteria = null)
Returns a new ChildResourceQuery object.
at line 114
Resource|array|mixed
findPk(
mixed $key,
ConnectionInterface $con = null)
Find object by primary key.
Propel uses the instance pool to skip the database if the object exists. Go fast if the query is untouched.
$obj = $c->findPk(12, $con);
at line 196
ObjectCollection|array|mixed
findPks(
array $keys,
ConnectionInterface $con = null)
Find objects by primary key
$objs = $c->findPks(array(12, 56, 832), $con);
at line 217
ResourceQuery
filterByPrimaryKey(
mixed $key)
Filter the query by primary key
at line 230
ResourceQuery
filterByPrimaryKeys(
array $keys)
Filter the query by a list of primary keys
at line 254
ResourceQuery
filterById(
mixed $id = null,
string $comparison = null)
Filter the query on the id column
Example usage:
$query->filterById(1234); // WHERE id = 1234
$query->filterById(array(12, 34)); // WHERE id IN (12, 34)
$query->filterById(array('min' => 12)); // WHERE id > 12
at line 292
ResourceQuery
filterByCode(
string $code = null,
string $comparison = null)
Filter the query on the code column
Example usage:
$query->filterByCode('fooValue'); // WHERE code = 'fooValue'
$query->filterByCode('%fooValue%'); // WHERE code LIKE '%fooValue%'
at line 326
ResourceQuery
filterByCreatedAt(
mixed $createdAt = null,
string $comparison = null)
Filter the query on the created_at column
Example usage:
$query->filterByCreatedAt('2011-03-14'); // WHERE createdat = '2011-03-14'
$query->filterByCreatedAt('now'); // WHERE createdat = '2011-03-14'
$query->filterByCreatedAt(array('max' => 'yesterday')); // WHERE created_at > '2011-03-13'
at line 369
ResourceQuery
filterByUpdatedAt(
mixed $updatedAt = null,
string $comparison = null)
Filter the query on the updated_at column
Example usage:
$query->filterByUpdatedAt('2011-03-14'); // WHERE updatedat = '2011-03-14'
$query->filterByUpdatedAt('now'); // WHERE updatedat = '2011-03-14'
$query->filterByUpdatedAt(array('max' => 'yesterday')); // WHERE updated_at > '2011-03-13'
at line 400
ResourceQuery
filterByProfileResource(
ProfileResource|ObjectCollection $profileResource,
string $comparison = null)
Filter the query by a related \Thelia\Model\ProfileResource object
at line 423
ResourceQuery
joinProfileResource(
string $relationAlias = null,
string $joinType = Criteria::INNER_JOIN)
Adds a JOIN clause to the query using the ProfileResource relation
at line 458
ProfileResourceQuery
useProfileResourceQuery(
string $relationAlias = null,
string $joinType = Criteria::INNER_JOIN)
Use the ProfileResource relation ProfileResource object
at line 473
ResourceQuery
filterByResourceI18n(
ResourceI18n|ObjectCollection $resourceI18n,
string $comparison = null)
Filter the query by a related \Thelia\Model\ResourceI18n object
at line 496
ResourceQuery
joinResourceI18n(
string $relationAlias = null,
string $joinType = 'LEFT JOIN')
Adds a JOIN clause to the query using the ResourceI18n relation
at line 531
ResourceI18nQuery
useResourceI18nQuery(
string $relationAlias = null,
string $joinType = 'LEFT JOIN')
Use the ResourceI18n relation ResourceI18n object
at line 547
ResourceQuery
filterByProfile(
Profile $profile,
string $comparison = Criteria::EQUAL)
Filter the query by a related Profile object using the profile_resource table as cross reference
at line 562
ResourceQuery
prune(
Resource $resource = null)
Exclude object from result
at line 577
int
doDeleteAll(
ConnectionInterface $con = null)
Deletes all rows from the resource table.
at line 614
int
delete(
ConnectionInterface $con = null)
Performs a DELETE on the database, given a ChildResource or Criteria object OR a primary key value.
at line 655
ResourceQuery
recentlyUpdated(
int $nbDays = 7)
Filter by the latest updated
at line 667
ResourceQuery
recentlyCreated(
int $nbDays = 7)
Filter by the latest created
at line 677
ResourceQuery
lastUpdatedFirst()
Order by update date desc
at line 687
ResourceQuery
firstUpdatedFirst()
Order by update date asc
at line 697
ResourceQuery
lastCreatedFirst()
Order by create date desc
at line 707
ResourceQuery
firstCreatedFirst()
Order by create date asc
at line 723
ResourceQuery
joinI18n(
string $locale = 'en_US',
string $relationAlias = null,
string $joinType = Criteria::LEFT_JOIN)
Adds a JOIN clause to the query using the i18n relation
at line 741
ResourceQuery
joinWithI18n(
string $locale = 'en_US',
string $joinType = Criteria::LEFT_JOIN)
Adds a JOIN clause to the query and hydrates the related I18n object.
Shortcut for $c->joinI18n($locale)->with()
at line 762
ResourceI18nQuery
useI18nQuery(
string $locale = 'en_US',
string $relationAlias = null,
string $joinType = Criteria::LEFT_JOIN)
Use the I18n relation query object
at line 61
ChildResourceQuery
orderById($order = Criteria::ASC)
Order by the id column
at line 61
ChildResourceQuery
orderByCode($order = Criteria::ASC)
Order by the code column
at line 61
ChildResourceQuery
orderByCreatedAt($order = Criteria::ASC)
Order by the created_at column
at line 61
ChildResourceQuery
orderByUpdatedAt($order = Criteria::ASC)
Order by the updated_at column
at line 61
ChildResourceQuery
groupById()
Group by the id column
at line 61
ChildResourceQuery
groupByCode()
Group by the code column
at line 61
ChildResourceQuery
groupByCreatedAt()
Group by the created_at column
at line 61
ChildResourceQuery
groupByUpdatedAt()
Group by the updated_at column
at line 61
ChildResourceQuery
leftJoin($relation)
Adds a LEFT JOIN clause to the query
at line 61
ChildResourceQuery
rightJoin($relation)
Adds a RIGHT JOIN clause to the query
at line 61
ChildResourceQuery
innerJoin($relation)
Adds a INNER JOIN clause to the query
at line 61
ChildResourceQuery
leftJoinProfileResource($relationAlias = null)
Adds a LEFT JOIN clause to the query using the ProfileResource relation
at line 61
ChildResourceQuery
rightJoinProfileResource($relationAlias = null)
Adds a RIGHT JOIN clause to the query using the ProfileResource relation
at line 61
ChildResourceQuery
innerJoinProfileResource($relationAlias = null)
Adds a INNER JOIN clause to the query using the ProfileResource relation
at line 61
ChildResourceQuery
leftJoinResourceI18n($relationAlias = null)
Adds a LEFT JOIN clause to the query using the ResourceI18n relation
at line 61
ChildResourceQuery
rightJoinResourceI18n($relationAlias = null)
Adds a RIGHT JOIN clause to the query using the ResourceI18n relation
at line 61
ChildResourceQuery
innerJoinResourceI18n($relationAlias = null)
Adds a INNER JOIN clause to the query using the ResourceI18n relation
at line 61
ChildResource
findOne(
ConnectionInterface $con = null)
Return the first ChildResource matching the query
at line 61
ChildResource
findOneOrCreate(
ConnectionInterface $con = null)
Return the first ChildResource matching the query, or a new ChildResource object populated from the query conditions when no match is found
at line 61
ChildResource
findOneById(
int $id)
Return the first ChildResource filtered by the id column
at line 61
ChildResource
findOneByCode(
string $code)
Return the first ChildResource filtered by the code column
at line 61
ChildResource
findOneByCreatedAt(
string $created_at)
Return the first ChildResource filtered by the created_at column
at line 61
ChildResource
findOneByUpdatedAt(
string $updated_at)
Return the first ChildResource filtered by the updated_at column
at line 61
array
findById(
int $id)
Return ChildResource objects filtered by the id column
at line 61
array
findByCode(
string $code)
Return ChildResource objects filtered by the code column
at line 61
array
findByCreatedAt(
string $created_at)
Return ChildResource objects filtered by the created_at column
at line 61
array
findByUpdatedAt(
string $updated_at)
Return ChildResource objects filtered by the updated_at column